brintos

brintos / llvm-project-archived public Read only

0
0
Text · 392 B · 85e7c5e Raw
27 lines · c
1#include <stdio.h>2#include <stdlib.h>3 4char *pointer;5char *another_pointer;6 7void f1() {8    pointer = malloc(10); // malloc line9    another_pointer = malloc(20); // malloc2 line10}11 12void f2() {13    free(pointer); // free line14}15 16int main (int argc, char const *argv[])17{18    f1();19    f2();20 21    printf("Hello world!\n"); // break line22 23    pointer[0] = 'A'; // BOOM line24 25    return 0;26}27