diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-06-02 01:00:04 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-06-02 01:00:04 +0000 |
commit | 8e1d5ee4ea4fcb2b3148fe872e0f7998f69683f4 (patch) | |
tree | f33c4b28882f08b2acc5f484849c7b751bbab843 /lib | |
parent | 32c1048a85622ab927ae844e5c3c79eb1c503f1d (diff) | |
download | netpbm-mirror-8e1d5ee4ea4fcb2b3148fe872e0f7998f69683f4.tar.gz netpbm-mirror-8e1d5ee4ea4fcb2b3148fe872e0f7998f69683f4.tar.xz netpbm-mirror-8e1d5ee4ea4fcb2b3148fe872e0f7998f69683f4.zip |
Don't free selector when there isn't one - bug from recent commit
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3828 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpbmfont0.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libpbmfont0.c b/lib/libpbmfont0.c index a8027a38..9c876926 100644 --- a/lib/libpbmfont0.c +++ b/lib/libpbmfont0.c @@ -248,15 +248,18 @@ pbm_destroybdffont2_base(struct font2 * const font2P) { ---------------------------------------------------------------------------- */ pm_strfree(font2P->name); + pm_strfree(font2P->charset_string); + free(font2P->glyph); - pm_selector_destroy(font2P->selectorP); - if (font2P->oldfont !=NULL) - pbm_freearray(font2P->oldfont, font2P->frows); + if (font2P->selectorP) + pm_selector_destroy(font2P->selectorP); - free((void *)font2P); + if (font2P->oldfont) + pbm_freearray(font2P->oldfont, font2P->frows); + free(font2P); } |