Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-09-14 18:12:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-09-14 18:12:40 +0300
commit0271414aadfba6162456f0c5493529e64c3b32a4 (patch)
tree59023c43817cb3c778f69bcd295cad2ce54464ff /source
parent3056add0e0b087f7e08781095fcdd99d08ca8f25 (diff)
Fix T46109: Bitmap font objects leads to unfreed memory.
Diffstat (limited to 'source')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index b8771e372cf..5c79eb2c544 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -128,6 +128,13 @@ void imb_freetilesImBuf(ImBuf *ibuf)
ibuf->mall &= ~IB_tiles;
}
+static void imb_free_bitmap_font(ImBuf *ibuf)
+{
+ if (ibuf->userdata && (ibuf->userflags & IB_BITMAPFONT)) {
+ MEM_freeN(ibuf->userdata);
+ }
+}
+
static void freeencodedbufferImBuf(ImBuf *ibuf)
{
if (ibuf == NULL) return;
@@ -181,6 +188,7 @@ void IMB_freeImBuf(ImBuf *ibuf)
imb_freerectImBuf(ibuf);
imb_freerectfloatImBuf(ibuf);
imb_freetilesImBuf(ibuf);
+ imb_free_bitmap_font(ibuf);
IMB_freezbufImBuf(ibuf);
IMB_freezbuffloatImBuf(ibuf);
freeencodedbufferImBuf(ibuf);