X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/b165006759a81e8ecc4e86e0540fd69343ea46e9..038ec85e825fc940c1387f64a88ae73b75f6822b:/unix/gtkfont.c diff --git a/unix/gtkfont.c b/unix/gtkfont.c index 56ae0315..d241db0e 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -191,8 +191,10 @@ static char *x11_guess_derived_font_name(XFontStruct *xfs, int bold, int wide) p++; } - if (nstr < lenof(strings)) + if (nstr < lenof(strings)) { + sfree(dupname); return NULL; /* XLFD was malformed */ + } if (bold) strings[2] = "bold";