#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>

char* reserveMemory(int size)
{
	char *temp = (char *) malloc(size);
	return temp;
}

int main(void)
{
    /* Create an array for storing dummy data */
    char *c = reserveMemory(10);
    printf("(malloc) %p\n", c);
    c[0] = 5;

    char *c2 = reserveMemory(10);
    printf("(malloc) %p\n", c2);
    free(c);
    free(c2);
    free(c2); // double free
    return 0;
}
