diff options
author | hj kim <backto.kim@samsung.com> | 2020-03-17 10:56:02 +0900 |
---|---|---|
committer | hj kim <backto.kim@samsung.com> | 2020-03-17 10:59:31 +0900 |
commit | 854f67afeb90b6610fc84e682fd72774b4ca37d2 (patch) | |
tree | 023080f19c26281c490a863aa48e84d43c3e4d70 /src | |
parent | 0c6efd9728efa22bb69b5b6a31ea05bea1e129d2 (diff) | |
download | libmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.tar.gz libmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.tar.bz2 libmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.zip |
Fix memory leaksubmit/tizen/20200317.020149submit/tizen/20200316.031954accepted/tizen/unified/20200318.130539
Change-Id: Iff3a0406cd65e598f58050a41bc20eedbba30496
Diffstat (limited to 'src')
-rwxr-xr-x | src/media-thumbnail.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index 8fe3eb2..2b986de 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -437,7 +437,10 @@ int create_video_thumbnail_to_file(const char *path, unsigned int width, unsigne rot_type = MM_UTIL_ROTATE_0; //Extract thumbnail - return __get_video_thumb_to_file(video_width, video_height, frame, frame_size, rot_type, thumb_path, width, height); + err = __get_video_thumb_to_file(video_width, video_height, frame, frame_size, rot_type, thumb_path, width, height); + g_free(frame); + + return err; } int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height, bool auto_rotate) @@ -468,6 +471,7 @@ int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsig err = mm_image_get_image(img, thumb_width, thumb_height, NULL, thumb_buffer, thumb_size); mm_image_destroy_image(img); + g_free(frame); return err; } |