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 <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2016-03-17 12:24:44 -07:00
parent 5ba47aa150
commit 115a7f444e
+1
View File
@@ -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);