]> granicus.if.org Git - nethack/commitdiff
free newbmp memory
authornhmall <nhmall@nethack.org>
Fri, 13 Jan 2023 00:24:52 +0000 (19:24 -0500)
committernhmall <nhmall@nethack.org>
Fri, 13 Jan 2023 00:24:52 +0000 (19:24 -0500)
Even though the program is exiting on the next line, free the
memory that was allocated. That should keep any monitoring tools
content.

win/share/tile2bmp.c

index 64a25dacf94d83d70ff5ebe9c5c4367792fbb0ae..a2d5a580c49ba6e237f3f83dc44020326b09a219 100644 (file)
@@ -269,6 +269,7 @@ main(int argc, char *argv[])
     fwrite(newbmp, bmpsize, 1, fp);
     fclose(fp);
     Fprintf(stderr, "Total of %d tiles written to %s.\n", tilecount, bmpname);
+    free((genericptr_t) newbmp);
 
     exit(EXIT_SUCCESS);
     /*NOTREACHED*/