Mismatched free() / delete / delete [] line no missing

Could you tell me the possibilities of the reason to get the Mismatched free() / delete / delete [].

I unable to see the line no in the valgrind report. it displays the function name. with that function name, I am not able to find where exactly the issue is there.I am getting the Mismatched free() / delete / delete [].

Thanks in Advance.

Without knowing what language you're using, anything about what your code looks like, nor what error is actually being reported by valgrind , about all that we can say is that you are probably trying to free an area of memory that you allocated at some point in the past and corrupted part of the region of memory that your memory allocation library uses to keep track of its memory pool OR you are trying to free memory that was never allocated.

Without more information, every assignment statement in your code is suspect, every return statement in your code is suspect, and every reference to every object that is a pointer in your code is suspect.

Weren't the explanations in your other thread sufficient? Can't you debug your programme, or, at least, print out the contents of the variables (pointers) in question?

From your other thread, you are doing this:

char *mem=new char;
mem=NULL;
delete mem;

You can't delete NULL. You can only delete a value given to you by new. That's why it crashes.

valgrind is not magic, and the value of the pointer is literally all valgrind, or new / delete, track. If you feed it an invalid pointer, such as NULL, it won't be able to make sense of it.

Duplicate thread closed.