chiark / gitweb /
config-parser: fix mem leak
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 31 Aug 2014 21:13:12 +0000 (23:13 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 31 Aug 2014 21:25:34 +0000 (23:25 +0200)
src/shared/conf-parser.c

index 439cfc58fc146e6d4f397b4e98ef25fbf2276f98..ee6de653e13286220202f067485e2e70cdbeea1c 100644 (file)
@@ -710,6 +710,7 @@ int config_parse_strv(const char *unit,
 
                 if (!utf8_is_valid(n)) {
                         log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
 
                 if (!utf8_is_valid(n)) {
                         log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
+                        free(n);
                         continue;
                 }
 
                         continue;
                 }