[systemd-commits] 2 commits - src/journal-remote src/shared

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Sun Aug 31 14:25:40 PDT 2014


 src/journal-remote/journal-remote-parse.c |    2 +-
 src/shared/conf-parser.c                  |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e60277835e61597011358afcdbfb3dd712ce128
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sun Aug 31 23:13:12 2014 +0200

    config-parser: fix mem leak

diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 439cfc5..ee6de65 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -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);
+                        free(n);
                         continue;
                 }
 

commit e4c38cc36e287d46a56a98066cc368ee6fdd1968
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sun Aug 31 22:54:40 2014 +0200

    journal-remote: fix check if realloc failed

diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index dfb87d4..e7eb151 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -478,7 +478,7 @@ int process_source(RemoteSource *source, bool compress, bool seal) {
                 char *tmp;
 
                 tmp = realloc(source->buf, target);
-                if (tmp)
+                if (!tmp)
                         log_warning("Failed to reallocate buffer to (smaller) size %zu",
                                     target);
                 else {



More information about the systemd-commits mailing list