If you used new then use delete, if you used malloc (shouldn't in a C++ program) use free. You might want to check if the pointer is null before calling delete (or free)
That second delete line might do some really bad things to you. It might, depending on the phase of the moon, corrupt your heap, crash your program, make arbitrary and bizarre changes to objects that are already out there on the heap, etc.