X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=9914b16f83b5a60a81f8ceb500e426bfec6b8b0a;hp=f6df5544d2b3a6cd3fbaf72fd53ad52ad1cb2d96;hb=8f33ee4940b9c35bf4627b7ef1126d03748da646;hpb=aca666256c715771b11d3277e10ff971aea44af8 diff --git a/src/editor.c b/src/editor.c index f6df5544..9914b16f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3075,8 +3075,7 @@ static void ReinitializeElementList() int pos = 0; int i, j; - if (editor_elements != NULL) - free(editor_elements); + checked_free(editor_elements); if (!initialized) { @@ -5533,8 +5532,7 @@ char *getElementDescriptionFilename(int element) static char *filename = NULL; char basename[MAX_FILENAME_LEN]; - if (filename != NULL) - free(filename); + checked_free(filename); /* 1st try: look for element description file for exactly this element */ sprintf(basename, "%s.txt", element_info[element].token_name);