summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2016-12-13 10:45:30 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2016-12-13 10:45:45 +0900
commit3b3af6e4e8cfde094f9882ff1c1cd8ff1cf4b231 (patch)
tree4070999a4aeb0dd384b8bb1e7519d5bd1aca16ff
parent401318eae44a7d580fcb8bae1775bbf39521092d (diff)
downloadxdgmime-accepted/tizen_3.0_wearable.tar.gz
xdgmime-accepted/tizen_3.0_wearable.tar.bz2
xdgmime-accepted/tizen_3.0_wearable.zip
Change-Id: I5598b82a2645784a80bcfa5fc3114190d74c893c Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--xdgmime/src/xdgmimecache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xdgmime/src/xdgmimecache.c b/xdgmime/src/xdgmimecache.c
index b9244ec..ddcb90c 100644
--- a/xdgmime/src/xdgmimecache.c
+++ b/xdgmime/src/xdgmimecache.c
@@ -146,7 +146,11 @@ _xdg_mime_cache_new_from_file (const char *file_name)
cache = (XdgMimeCache *) malloc (sizeof (XdgMimeCache));
if (cache == NULL)
- return NULL;
+ {
+ munmap (buffer, st.st_size);
+
+ goto done;
+ }
cache->minor = minor;
cache->ref_count = 1;