X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkfont.c;h=d241db0e8960d9604806a9bd43bba2644e4ce812;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=56ae031525e2ed02133efd41e97580b8a3726537;hpb=3d69dd2071839c73d1eb76aead16639b9f5bce1e;p=PuTTY.git 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";