]> granicus.if.org Git - nethack/commitdiff
Free allocated memory
authorPasi Kallinen <paxed@alt.org>
Tue, 11 Oct 2016 15:34:41 +0000 (18:34 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 11 Oct 2016 15:34:41 +0000 (18:34 +0300)
src/do_name.c

index e55caf1d36d831f7a95a951d910cb5cac3f83680..3a98b5662150a7b8930f8ac3067f15d086e1d4f4 100644 (file)
@@ -415,6 +415,7 @@ boolean fovonly;
     gather_locs(&garr, &gcount,
                 fovonly ? GLOC_INTERESTING_FOV : GLOC_INTERESTING);
     if (gcount < 2) { /* gcount always includes the hero */
+        free((genericptr_t) garr);
         You("cannot %s anything interesting.", fovonly ? "see" : "detect");
         return FALSE;
     }