]> granicus.if.org Git - nethack/commitdiff
Fix memory leak when adding basic color menucolors
authorPasi Kallinen <paxed@alt.org>
Fri, 30 Oct 2020 21:01:50 +0000 (23:01 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 30 Oct 2020 21:04:22 +0000 (23:04 +0200)
src/options.c

index f009079127b39049291c157196a42664bed6711d..8172cc3983f2f183a33eeffee16ab7c733ba82e8 100644 (file)
@@ -6579,7 +6579,7 @@ boolean load_colors;
                 if (c == CLR_BLACK || c == CLR_WHITE || c == NO_COLOR)
                     continue; /* skip these */
                 Sprintf(cnm, patternfmt, colornames[i].name);
-                add_menu_coloring_parsed(dupstr(cnm), c, ATR_NONE);
+                add_menu_coloring_parsed(cnm, c, ATR_NONE);
             }
 
             /* right now, menu_colorings contains the alternate color list;