[Pcsclite-cvs-commit] r5840 - in /trunk/PCSC/src: hotplug_libudev.c hotplug_libusb.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Wed Jul 6 11:49:36 UTC 2011


Author: rousseau
Date: Wed Jul  6 11:49:35 2011
New Revision: 5840

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5840
Log:
Fix a memory leak

coverity: Event leaked_storage: Variable "hpDir" going out of scope
leaks the storage it points to.

Modified:
    trunk/PCSC/src/hotplug_libudev.c
    trunk/PCSC/src/hotplug_libusb.c

Modified: trunk/PCSC/src/hotplug_libudev.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libudev.c?rev=5840&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libudev.c (original)
+++ trunk/PCSC/src/hotplug_libudev.c Wed Jul  6 11:49:35 2011
@@ -199,6 +199,7 @@
 					{
 						Log1(PCSC_LOG_CRITICAL, "Not enough memory");
 						driverSize = -1;
+						(void)closedir(hpDir);
 						return -1;
 					}
 

Modified: trunk/PCSC/src/hotplug_libusb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libusb.c?rev=5840&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libusb.c (original)
+++ trunk/PCSC/src/hotplug_libusb.c Wed Jul  6 11:49:35 2011
@@ -217,6 +217,7 @@
 					{
 						Log1(PCSC_LOG_CRITICAL, "Not enough memory");
 						driverSize = -1;
+						closedir(hpDir);
 						return -1;
 					}
 




More information about the Pcsclite-cvs-commit mailing list