fix svace issue. 79/125879/1
authorHyihong Chae <hh.chae@samsung.com>
Wed, 19 Apr 2017 07:51:52 +0000 (16:51 +0900)
committerHyihong Chae <hh.chae@samsung.com>
Wed, 19 Apr 2017 07:51:52 +0000 (16:51 +0900)
Change-Id: Ie7a3e7acdff2a6e75084f4ae387d05e13f96eb73
Signed-off-by: HyiHong Chae <hh.chae@samsung.com>
packaging/libmtp.spec
src/libusb1-glue.c

index ab8c0be..69ca86e 100755 (executable)
@@ -3,7 +3,7 @@
 Name:       libmtp
 Summary:    Library for media transfer protocol (mtp)
 Version:    1.1.11
-Release:    8
+Release:    9
 Group:      Network & Connectivity/Other
 License:    LGPL-2.1
 Source0:    libmtp-%{version}.tar.gz
index c39603f..212edcd 100755 (executable)
@@ -926,8 +926,10 @@ ptp_read_func (
 
     LIBMTP_USB_DEBUG("Result of read: 0x%04x (%d bytes)\n", ret, xread);
 
-    if (ret != LIBUSB_SUCCESS)
+    if (ret != LIBUSB_SUCCESS) {
+      free(bytes);
       return PTP_ERROR_IO;
+    }
 
     LIBMTP_USB_DEBUG("<==USB IN\n");
     if (xread == 0)