cppcheck/test/testsuites/duma/leak1.c

13 lines
178 B
C
Raw Normal View History

2019-03-18 06:58:12 +01:00
#include <stdio.h>
int main() {
printf("Hello world!\n");
int* pI;
pI = (int*)malloc(sizeof(int));
printf("Let's leak a pointer to int\n");
*pI = 303;
return 0;
}