]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3161] Avoid memory leak in the log message compiler.
authorMarcin Siodelski <marcin@isc.org>
Tue, 13 Sep 2016 12:44:35 +0000 (14:44 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 13 Sep 2016 12:44:35 +0000 (14:44 +0200)
tools/system_messages.cc

index ef2173dadb7b8ed19fc7b134df9633c87e52a97b..74e5171b428e9bb02de87ee737dd02d14237e13a 100644 (file)
@@ -451,6 +451,7 @@ void processFileContent(const std::string& filename,
                 char* word1 = strtok(NULL, " \t\r\n\t\v");
                 prefix = word1;
             }
+            delete[] line;
         } else if (l->at(0) == '%') {
             // Start of a message.  Add the message we were processing to the
             // dictionary and clear everything apart from the file name.