[systemd-commits] 2 commits - src/journal src/shared
Ronny Chevalier
rchevalier at kemper.freedesktop.org
Thu Apr 9 10:20:12 PDT 2015
src/journal/test-journal-flush.c | 4 ++--
src/shared/util.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 3e348b8a6af4bc46562efa44500fe2fa44320aa1
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date: Thu Apr 9 11:23:53 2015 +0200
test-journal-flush: fix memleak
diff --git a/src/journal/test-journal-flush.c b/src/journal/test-journal-flush.c
index 914ca0b..2d4f531 100644
--- a/src/journal/test-journal-flush.c
+++ b/src/journal/test-journal-flush.c
@@ -27,8 +27,8 @@
#include "journal-internal.h"
int main(int argc, char *argv[]) {
-
- char dn[] = "/var/tmp/test-journal-flush.XXXXXX", *fn;
+ _cleanup_free_ char *fn = NULL;
+ char dn[] = "/var/tmp/test-journal-flush.XXXXXX";
JournalFile *new_journal = NULL;
sd_journal *j = NULL;
unsigned n = 0;
commit cd977dca10a9c6ce29a4720914718c74c3b84a76
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date: Thu Apr 9 11:00:35 2015 +0200
util: cunescape - fix memleak in error path
diff --git a/src/shared/util.c b/src/shared/util.c
index 3a80f26..23468b7 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1505,6 +1505,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi
continue;
}
+ free(r);
return -EINVAL;
}
@@ -1516,6 +1517,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi
continue;
}
+ free(r);
return k;
}
More information about the systemd-commits
mailing list