# HG changeset patch # User Chad Peckham # Date 1270141337 18000 # Node ID 73a397acd93cc2de0f3736377e1ada57606c63fb # Parent c2836b036bd58526954b2105a10130af940313cb Fix bug 11010 - free descriptor only if get was successful - merge from 3.0 diff -r c2836b036bd5 -r 73a397acd93c connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java --- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Wed Mar 31 16:21:55 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Thu Apr 01 12:02:17 2010 -0500 @@ -1047,6 +1047,8 @@ } if (DEBUG) System.out.println("getAllDeviceUSBPersonalities all devices read"); //$NON-NLS-1$ dwResult = library.UPAPI_FreeDeviceDescriptor(numUSBDevicesFound, pDeviceDescriptor); + if (DEBUG) + System.out.printf("UPAPI_FreeDeviceDescriptor dwResult = %x\n", dwResult); //$NON-NLS-1$ } else { apiError = true; if (DEBUG) @@ -1077,12 +1079,14 @@ // get all the supported personalities for this device apiError = getSupportedPersonalities(deviceInfo, pid, persDesc, numPers); + dwResult = library.UPAPI_FreePersonalityDescriptors(persDesc); + if (DEBUG) + System.out.printf("UPAPI_FreePersonalityDescriptors dwResult = %x\n", dwResult); //$NON-NLS-1$ } else { apiError = true; if (DEBUG) System.out.printf("UPAPI_GetPersonalityDescriptors dwResult = %x\n", dwResult); //$NON-NLS-1$ } - dwResult = library.UPAPI_FreePersonalityDescriptors(persDesc); if (apiError == false) { if (DEBUG) System.out.println("getAllDeviceUSBPersonalities deviceInfo added"); //$NON-NLS-1$ p.add(deviceInfo);