diff options
author | Akira TAGOH <akira@tagoh.org> | 2012-06-01 19:06:17 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2012-06-01 19:06:17 +0900 |
commit | 1b692d8ab91a096e7d433c51ab187382de91147b (patch) | |
tree | 45f44a807da2812eab3043d2e8d375d9035db8ae /src/fcstr.c | |
parent | 5254a6630fdf132b0cda62c1bc7e8e40d2639bdf (diff) |
Fix the wrong estimation for the memory usage information in fontconfig
Diffstat (limited to 'src/fcstr.c')
-rw-r--r-- | src/fcstr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fcstr.c b/src/fcstr.c index f20d05e7..e372af08 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -833,6 +833,7 @@ FcStrBufChar (FcStrBuf *buf, FcChar8 c) if (buf->allocated) { size = buf->size * 2; + FcMemFree (FC_MEM_STRBUF, buf->size); new = realloc (buf->buf, size); } else @@ -850,8 +851,6 @@ FcStrBufChar (FcStrBuf *buf, FcChar8 c) buf->failed = FcTrue; return FcFalse; } - if (buf->size) - FcMemFree (FC_MEM_STRBUF, buf->size); FcMemAlloc (FC_MEM_STRBUF, size); buf->size = size; buf->buf = new; |