]> granicus.if.org Git - nethack/commitdiff
Add missing regex_frees
authorPasi Kallinen <paxed@alt.org>
Sat, 31 Oct 2015 23:38:12 +0000 (01:38 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 31 Oct 2015 23:38:12 +0000 (01:38 +0200)
src/options.c

index 07f124a56658d70f416c992fae70b7bd506b6a06..ba2b05fd4b5df8acc7d32dea8ff62bb6dc6fc3b4 100644 (file)
@@ -1384,6 +1384,7 @@ char *pattern;
         else
             pline("%s: %s", re_error, regex_error_desc(tmp->regex));
         wait_synch();
+        regex_free(tmp->regex);
         free(tmp);
         return FALSE;
     }
@@ -1499,6 +1500,7 @@ int c, a;
         else
             pline("%s: %s", re_error, regex_error_desc(tmp->match));
         wait_synch();
+        regex_free(tmp->match);
         free(tmp);
         return FALSE;
     } else {