@@ -150,6 +150,7 @@ void print_sentence (PyObject *pyFd, const int type, const char *msg)
PyFile_WriteString(sentence, pyFd);
G_free((void *)sentence);
+ sentence = NULL;
PyFile_WriteString("\n", pyFd);
start = next;
@@ -346,6 +346,7 @@ int Nviz::SetWireColor(int id, const char* color_str)
}
G_free(surf_list);
+ surf_list = NULL;
return 1;
@@ -150,6 +150,7 @@ int DisplayDriver::DrawMap(bool force)
isles[j] = NULL;
G_free((void *) isles);
+ isles = NULL;
@@ -860,6 +860,7 @@ int Digit::CopyLines(std::vector<int> ids, const char* bgmap_name)
if (bgMap) {
Vect_close(bgMap);
G_free ((void *) bgMap);
+ bgMap = NULL;
return ret;