Browse Source

[3161] Avoid memory leak in the log message compiler.

Marcin Siodelski 8 years ago
parent
commit
9aa2ab27d1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tools/system_messages.cc

+ 1 - 0
tools/system_messages.cc

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