Hi I created a char* pointer and malloc a certain size to it. Then I pass this pointer to a function which fills up the memory allocated.
Now i want to free the memory allocated but I keep getting some error. Heap corruption detected
Here is what i did
the freeing part i did thisCode:char* buffer; buffer = (char*)malloc(100); fillupbuffer(&buffer);
and there comes the error.Code:free(buffer);