summaryrefslogtreecommitdiff
path: root/src/media-thumbnail.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-10-13 01:19:41 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2015-10-13 01:51:23 (GMT)
commite646e3b166173167a94b319b0a9889b22a55f2e7 (patch)
tree76ced7ed64ed9af47a2596074feebc1625614744 /src/media-thumbnail.c
parente787f69ce984b7b225c291ebe81664530a8284c9 (diff)
downloadlibmedia-thumbnail-e646e3b166173167a94b319b0a9889b22a55f2e7.zip
libmedia-thumbnail-e646e3b166173167a94b319b0a9889b22a55f2e7.tar.gz
libmedia-thumbnail-e646e3b166173167a94b319b0a9889b22a55f2e7.tar.bz2
Change-Id: I9bb372674a3fe257278b4867db0153d29b6a16da Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-xsrc/media-thumbnail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index dd16356..0920eec 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -121,6 +121,10 @@ int thumbnail_request_from_db_async(const char *origin_path, ThumbFunc func, voi
thumb_dbg_slog("Path : %s", origin_path);
thumbUserData *userData = (thumbUserData*)malloc(sizeof(thumbUserData));
+ if (userData == NULL) {
+ thumb_err("memory allocation failed");
+ return MS_MEDIA_ERR_OUT_OF_MEMORY;
+ }
userData->func = (ThumbFunc)func;
userData->user_data = user_data;
@@ -152,6 +156,10 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_
thumb_dbg_slog("Path : %s", origin_path);
thumbRawUserData *userData = (thumbRawUserData*)malloc(sizeof(thumbRawUserData));
+ if(userData == NULL) {
+ thumb_err("userData malloc failed : %d", err);
+ return MS_MEDIA_ERR_OUT_OF_MEMORY;
+ }
userData->func = func;
userData->user_data = user_data;