summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVBS <vdtizen.sds@samsung.com>2019-01-17 11:25:24 +0900
committerVBS <vdtizen.sds@samsung.com>2019-01-17 11:27:02 +0900
commitf5ad0c4cb7922fd7b70e0437705e6e120c20ef67 (patch)
tree85a546cfea72a9bec694590019c61310931f7950
parent0f2b28f395a993f4809db74ca570715164988834 (diff)
downloadlibmtp-f5ad0c4cb7922fd7b70e0437705e6e120c20ef67.tar.gz
libmtp-f5ad0c4cb7922fd7b70e0437705e6e120c20ef67.tar.bz2
libmtp-f5ad0c4cb7922fd7b70e0437705e6e120c20ef67.zip
- WGID 371624 Change-Id: Ieb5a6f81ba040318a426c03fc16bdababf9396e0 Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
-rwxr-xr-xsrc/libmtp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmtp.c b/src/libmtp.c
index ae9c088..c329034 100755
--- a/src/libmtp.c
+++ b/src/libmtp.c
@@ -9342,6 +9342,11 @@ int LIBMTP_Get_Object_Handles(LIBMTP_mtpdevice_t *device, uint32_t storage,
*object_list = (uint32_t *)malloc(currentHandles.n * sizeof(int));
if (*object_list == NULL) {
LIBMTP_INFO("object list is NULL");
+ if (currentHandles.Handler != NULL) {
+ free(currentHandles.Handler);
+ currentHandles.Handler = NULL;
+ }
+
return -4;
}