[systemd-commits] src/journal

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Mon Jun 16 14:54:35 PDT 2014


 src/journal/journal-remote.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e94b5a7bc201fe73c4a291169c5c1d21cceee128
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Mon Jun 16 23:49:10 2014 +0200

    journal-remote: fix memleak

diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c
index 915f234..31401fb 100644
--- a/src/journal/journal-remote.c
+++ b/src/journal/journal-remote.c
@@ -291,7 +291,7 @@ static int remove_source(RemoteServer *s, int fd) {
 
 static int add_source(RemoteServer *s, int fd, const char* name) {
         RemoteSource *source = NULL;
-        char *realname;
+        _cleanup_free_ char *realname = NULL;
         int r;
 
         assert(s);
@@ -307,11 +307,11 @@ static int add_source(RemoteServer *s, int fd, const char* name) {
                         return log_oom();
         }
 
-        log_debug("Creating source for fd:%d (%s)", fd, name);
+        log_debug("Creating source for fd:%d (%s)", fd, realname);
 
         r = get_source_for_fd(s, fd, &source);
         if (r < 0) {
-                log_error("Failed to create source for fd:%d (%s)", fd, name);
+                log_error("Failed to create source for fd:%d (%s)", fd, realname);
                 return r;
         }
         assert(source);



More information about the systemd-commits mailing list