From: Amritanshu Date: Mon, 14 Sep 2020 11:34:40 +0000 (+0530) Subject: Fixed SVACE issue X-Git-Tag: submit/tizen/20200914.152130^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e7183d719baef606f17c848e5fedb1b97a0808c;p=profile%2Fcommon%2Fapps%2Fnative%2Ffirmware-update-app-ui.git Fixed SVACE issue Change-Id: I578319260f840404220ad643df5b57cca45ff6fb Signed-off-by: Amritanshu --- diff --git a/src/interaction.c b/src/interaction.c index b0b41af..53d87a8 100755 --- a/src/interaction.c +++ b/src/interaction.c @@ -71,7 +71,10 @@ static char* fota_get_update_image_version() bool flag_image = FALSE; char *image_path = NULL, *directory = NULL, *version = NULL, *token = NULL; char *cmd = strdup(download_cmd); - LOGI("cmd : %s", download_cmd); + if(!cmd) + return NULL; + + LOGI("cmd : %s", cmd); while ((token = strsep(&cmd, " "))) { if (strstr(token, "delta.tar")) { @@ -80,8 +83,10 @@ static char* fota_get_update_image_version() } } LOGI("Update image path : %s", image_path); - if(!image_path) + if(!image_path) { + free(cmd); return NULL; + } snprintf(path, sizeof(path), "%s", image_path);