SF Bug Tracker id 3496581 - Memory leak in getServiceList
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-03 08:43:23 PST serviceNodeList is not freed if current->next = malloc(sizeof(service_info)); returns NULL.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003 Intel Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -761,6 +762,7 @@ service_info *getServiceList(
|
||||
}
|
||||
if (!current) {
|
||||
freeServiceList(head);
|
||||
ixmlNodeList_free(serviceNodeList);
|
||||
return NULL;
|
||||
}
|
||||
current->next = NULL;
|
||||
|
Reference in New Issue
Block a user