diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2016-12-13 10:45:30 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2016-12-13 10:45:45 +0900 |
commit | 3b3af6e4e8cfde094f9882ff1c1cd8ff1cf4b231 (patch) | |
tree | 4070999a4aeb0dd384b8bb1e7519d5bd1aca16ff | |
parent | 401318eae44a7d580fcb8bae1775bbf39521092d (diff) | |
download | xdgmime-accepted/tizen_3.0_wearable.tar.gz xdgmime-accepted/tizen_3.0_wearable.tar.bz2 xdgmime-accepted/tizen_3.0_wearable.zip |
Fix resource leaksubmit/tizen_3.0/20161215.010253submit/tizen_3.0/20161213.042049submit/tizen_3.0.m2/20170104.093749accepted/tizen/3.0/wearable/20161216.013849accepted/tizen/3.0/tv/20161216.013833accepted/tizen/3.0/mobile/20161216.013726accepted/tizen/3.0/ivi/20161216.013902accepted/tizen/3.0/common/20161216.122734accepted/tizen/3.0.m2/wearable/20170104.122858accepted/tizen/3.0.m2/tv/20170104.122513accepted/tizen/3.0.m2/mobile/20170104.122247tizen_3.0_tvtizen_3.0.m2tizen_3.0accepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_iviaccepted/tizen_3.0_commonaccepted/tizen_3.0.m2_wearableaccepted/tizen_3.0.m2_tvaccepted/tizen_3.0.m2_mobile
Change-Id: I5598b82a2645784a80bcfa5fc3114190d74c893c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | xdgmime/src/xdgmimecache.c | 6 |
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; |