Skip to content

Commit

Permalink
correct null-pointer check (thanks to cppcheck)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawrence D'Oliveiro committed Aug 30, 2012
1 parent 36ae71f commit 7773049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subreader.c
Expand Up @@ -703,7 +703,7 @@ static const char *sub_readtext(const char *source, char **dest)
p++, len++;
} /*while*/
*dest = (char *)malloc(len + 1);
if (!dest)
if (!*dest)
{
return ERR;
} /*if*/
Expand Down

0 comments on commit 7773049

Please sign in to comment.