cppcheck/samples/memleak/bad.c

10 lines
129 B
C
Raw Permalink Normal View History

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