elftosb: fix crash on invalid command file

Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967
This commit is contained in:
Amaury Pouly 2013-12-06 11:37:49 +01:00
parent f365a5123f
commit c5b209f2d8

View file

@ -432,6 +432,8 @@ int main(int argc, char **argv)
}
struct cmd_file_t *cmd_file = db_parse_file(cmd_filename);
if(cmd_file == NULL)
bug("Error parsing command file\n");
struct sb_file_t *sb_file = apply_cmd_file(cmd_file);
db_free(cmd_file);