Skip to content

Commit

Permalink
improved malloc leak test
Browse files Browse the repository at this point in the history
  • Loading branch information
alperakcan committed Mar 29, 2013
1 parent b2d404d commit bff8cd7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/fail-00.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@ int main (int argc, char *argv[])
fprintf(stderr, "malloc failed\n");
exit(-1);
}
rc = malloc(1024);
if (rc == NULL) {
fprintf(stderr, "malloc failed\n");
exit(-1);
}
free(rc);
return 0;
}

0 comments on commit bff8cd7

Please sign in to comment.