summaryrefslogtreecommitdiff
path: root/src/lib/emile
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-26 09:38:13 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-26 09:38:13 +0200
commit97e24931e38a0f341c5486c953a36c9df5425771 (patch)
treeb5abfa91d04f4e61f3358d7cf6fd3ea0735ccece /src/lib/emile
parent47f5d668ccea383305989760181ad7b35c10a9f3 (diff)
emile: correctly free buffer allocated for compressed image.
CID 1295688
Diffstat (limited to 'src/lib/emile')
-rw-r--r--src/lib/emile/emile_image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index d0f35a16b3..018745cf12 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -497,8 +497,7 @@ _emile_tgv_data(Emile_Image *image,
497 if (block_length == 0) 497 if (block_length == 0)
498 { 498 {
499 *error = EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE; 499 *error = EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE;
500 eina_binbuf_free(buffer); 500 goto on_error;
501 return EINA_FALSE;
502 } 501 }
503 502
504 data_start = eina_binbuf_manage_new(m + offset, 503 data_start = eina_binbuf_manage_new(m + offset,
@@ -653,6 +652,7 @@ _emile_tgv_data(Emile_Image *image,
653 r = EINA_TRUE; 652 r = EINA_TRUE;
654 653
655on_error: 654on_error:
655 if (image->compress) eina_binbuf_free(buffer);
656 return r; 656 return r;
657} 657}
658 658