summaryrefslogtreecommitdiff
path: root/src/journal/journal-remote.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-16 23:49:10 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-16 23:51:34 +0200
commite94b5a7bc201fe73c4a291169c5c1d21cceee128 (patch)
treed78d93f88709a58507bd74ca89fed1660c8a81e3 /src/journal/journal-remote.c
parent40edd23670f977f9a7f12b372733a3668ec174d0 (diff)
journal-remote: fix memleak
Diffstat (limited to 'src/journal/journal-remote.c')
-rw-r--r--src/journal/journal-remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c
index 915f234ab2..31401fb3ee 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);