Free allocated memory

This commit is contained in:
Pasi Kallinen
2016-10-11 18:34:41 +03:00
parent 09c517e830
commit 23157c4830
+1
View 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;
}