String inputParam = log.getArgs();
String[] splitInputParam = inputParam.split("\\,"); //$NON-NLS-1$
String param = String.valueOf(splitInputParam[0]);
- int rmKey = -1;
+ long allocatedAddr = -1;
try {
if (param.contains("0x")) {
- rmKey = Integer.decode(param);
+ allocatedAddr = Long.decode(param);
} else {
- rmKey = Integer.parseInt(splitInputParam[0]);
+ allocatedAddr = Long.parseLong(splitInputParam[0]);
}
- leaks.remove(rmKey);
+ int rmKey = findAllocatedKey(leaks, allocatedAddr, log.getPid());
+ if (rmKey != -1)
+ leaks.remove(rmKey);
} catch (NumberFormatException e) {
Logger.exception(e);
}