[Pcsclite-cvs-commit] r4754 - /trunk/PCSC/src/hotplug_libhal.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Feb 12 10:23:11 UTC 2010


Author: rousseau
Date: Fri Feb 12 10:23:10 2010
New Revision: 4754

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4754
Log:
HPAddDevice(): fix a memory leak

Modified:
    trunk/PCSC/src/hotplug_libhal.c

Modified: trunk/PCSC/src/hotplug_libhal.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libhal.c?rev=4754&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libhal.c (original)
+++ trunk/PCSC/src/hotplug_libhal.c Fri Feb 12 10:23:10 2010
@@ -412,6 +412,7 @@
 		strlcat(fullname, " [", sizeof(fullname));
 		strlcat(fullname, sInterfaceName, sizeof(fullname));
 		strlcat(fullname, "]", sizeof(fullname));
+		libhal_free_string(sInterfaceName);
 	}
 
 	/* serial number from the device (if any) */
@@ -420,6 +421,7 @@
 		strlcat(fullname, " (", sizeof(fullname));
 		strlcat(fullname, sSerialNumber, sizeof(fullname));
 		strlcat(fullname, ")", sizeof(fullname));
+		libhal_free_string(sSerialNumber);
 	}
 
 	readerTracker[i].fullName = strdup(fullname);




More information about the Pcsclite-cvs-commit mailing list