cppcheck/test/testsuites/duma/leak1.c

13 lines
190 B
C
Raw Normal View History

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