From: Pasi Kallinen Date: Tue, 11 Oct 2016 15:34:41 +0000 (+0300) Subject: Free allocated memory X-Git-Tag: NetHack-3.6.1_RC01~570 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23157c48300de19493c0269b116b0f355959f3a5;p=nethack Free allocated memory --- diff --git a/src/do_name.c b/src/do_name.c index e55caf1d3..3a98b5662 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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; }