From: Junkyeong Kim Date: Thu, 31 Mar 2016 10:45:19 +0000 (+0900) Subject: add type casting for size vaule and fix handle leak X-Git-Tag: accepted/tizen/mobile/20160405.083517^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5a43bbc884c08b37573b0df8b8848a8f98cc296;p=platform%2Fadaptation%2Fspreadtrum%2Flibtbm-sprd.git add type casting for size vaule and fix handle leak Change-Id: I69de677bf924cee119d97bcd2946a7f5606bae77 Signed-off-by: Junkyeong Kim --- diff --git a/src/tbm_bufmgr_sprd.c b/src/tbm_bufmgr_sprd.c index e8874fa..f14aab2 100755 --- a/src/tbm_bufmgr_sprd.c +++ b/src/tbm_bufmgr_sprd.c @@ -834,7 +834,7 @@ tbm_sprd_bo_alloc (tbm_bo bo, int size, int flags) } #endif // USE_CONTIG_ONLY struct drm_sprd_gem_create arg = {0, }; - arg.size = size; + arg.size = (uint64_t)size; arg.flags = sprd_flags; if (drmCommandWriteRead(bufmgr_sprd->fd, DRM_SPRD_GEM_CREATE, &arg, sizeof(arg))) { @@ -1889,6 +1889,7 @@ init_tbm_bufmgr_priv (tbm_bufmgr bufmgr, int fd) if (!bufmgr_sprd->device_name) { TBM_SPRD_LOG ("[libtbm-sprd:%d] error: Fail to get device name!\n", getpid()); + close(bufmgr_sprd->fd); free (bufmgr_sprd); return 0; }