Skip to content

Commit

Permalink
Merge pull request #97 from conchurnavid/coverity_fixes
Browse files Browse the repository at this point in the history
Coverity fixes
  • Loading branch information
Narann committed Mar 6, 2015
2 parents 35fc02b + a285b67 commit b07829d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ static config_section * section_deepcopy(config_section *orig_section)
if (new_var->val.string == NULL)
{
delete_section(new_section);
delete_var(new_var);
return NULL;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/cheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static int cheat_parse_hacks_code(char *code, m64p_cheat_code **hack)

/* allocate buffer */
hackbuf = malloc(sizeof(*hackbuf) * num_codes);
if (!num_codes)
if (!hackbuf)
return 0;

/* parse cheatcodes */
Expand Down

0 comments on commit b07829d

Please sign in to comment.