1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdlib.h> int *malloc_wrapper() { return (int *) malloc(8); } void f() { int *ptr = malloc_wrapper(); if (ptr != 0) { ptr[5] = 10; } } int main() { f(); }