cppcheck/samples/memleak/good.c

11 lines
142 B
C
Raw Permalink Normal View History

#include <stdlib.h>
int main()
{
int result;
char *a = malloc(10);
a[0] = 0;
result = a[0];
free(a);
return result;
}