portablectl: fix memleaks
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 May 2018 11:56:44 +0000 (20:56 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 26 May 2018 14:57:02 +0000 (16:57 +0200)
Fixes #9089.

src/portable/portablectl.c

index 99690fc..39f273f 100644 (file)
@@ -272,7 +272,7 @@ static int inspect_image(int argc, char *argv[], void *userdata) {
                 fflush(stdout);
                 nl = true;
         } else {
-                const char *pretty_portable = NULL, *pretty_os = NULL;
+                _cleanup_free_ char *pretty_portable = NULL, *pretty_os = NULL;
 
                 _cleanup_fclose_ FILE *f;