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")) {
}
}
LOGI("Update image path : %s", image_path);
- if(!image_path)
+ if(!image_path) {
+ free(cmd);
return NULL;
+ }
snprintf(path, sizeof(path), "%s", image_path);