]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/logs-show: fix memleak in add_matches_for_unit 3005/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Apr 2016 03:36:37 +0000 (23:36 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Apr 2016 04:21:33 +0000 (00:21 -0400)
src/shared/logs-show.c

index e2d2931c51a773a9c15b13496e4cab50b9a3fca7..38a55525c0d6199516c8b4e9cf373d97b8d31ee2 100644 (file)
@@ -1073,7 +1073,7 @@ int add_matches_for_unit(sd_journal *j, const char *unit) {
         );
 
         if (r == 0 && endswith(unit, ".slice")) {
-                char *m5 = strappend("_SYSTEMD_SLICE=", unit);
+                const char *m5 = strjoina("_SYSTEMD_SLICE=", unit);
 
                 /* Show all messages belonging to a slice */
                 (void)(