]> granicus.if.org Git - graphviz/commitdiff
Free memory allocated in libgd
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:28:12 +0000 (18:28 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:28:12 +0000 (18:28 +0000)
lib/common/gdtextsize.c

index 7c1ab38e769ba2ae5eec6d105941bd7de0ee3431..9c3a1c664eb288a2b6c3de624fe96efc23dc376e 100644 (file)
@@ -125,6 +125,7 @@ char *gd_textsize(textline_t * textline, char *fontname, double fontsz,
        }
 
        *fontpath = strex.fontpath;
+       if (strex.fontpath) free (strex.fontpath);
 
        if (textline->str && textline->str[0]) {
            /* can't use brect on some archtectures if strlen 0 */