Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdlib.h>

char *f(int x) {
  char *p = (char *)malloc(4 * x);
  return p;
}

int main() {
  int x = 0;
  char *p = f(x);
  if (!p)
    *p = 1;
  return 0;
}