From 115a7f444e46a76eb634113c35eee63fdcb397c8 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Thu, 17 Mar 2016 12:24:44 -0700 Subject: [PATCH] Add missing free() for a memory allocation Even though swupd_make_pack will exit immediately in the event this error occurs, calling free() here will be needed if the error handling ever changes (e.g. returning from the function instead of exiting). Signed-off-by: Patrick McCarty --- src/pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pack.c b/src/pack.c index dd847b2..74ba0e4 100644 --- a/src/pack.c +++ b/src/pack.c @@ -52,6 +52,7 @@ static void empty_pack_stage(int full, int from_version, int to_version, char *m if (ret) { fprintf(stderr, "Failed to clean %s/%s/%i_to_%i\n", packstage_dir, module, from_version, to_version); + free(cmd); exit(EXIT_FAILURE); } free(cmd);