SF Bug Tracker id 3496942 - Memory leak in config_description_doc
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:55:54 PST element was not freed if membuffer_append_str(&url_str, "http://") does not return 0. Moreover addNew was not used.
This commit is contained in:
parent
7301f46269
commit
da244683cf
@ -2,6 +2,15 @@
|
|||||||
Version 1.6.16
|
Version 1.6.16
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
|
SF Bug Tracker id 3496942 - Memory leak in config_description_doc
|
||||||
|
|
||||||
|
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:55:54 PST
|
||||||
|
|
||||||
|
element was not freed if membuffer_append_str(&url_str, "http://") does
|
||||||
|
not return 0. Moreover addNew was not used.
|
||||||
|
|
||||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
SF Bug Tracker id 3496938 - Missing structures initialisation in some functions
|
SF Bug Tracker id 3496938 - Missing structures initialisation in some functions
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -211,10 +212,8 @@ static int config_description_doc(
|
|||||||
IN const char *ip_str,
|
IN const char *ip_str,
|
||||||
OUT char **root_path_str )
|
OUT char **root_path_str )
|
||||||
{
|
{
|
||||||
int addNew = FALSE;
|
|
||||||
IXML_NodeList *baseList;
|
IXML_NodeList *baseList;
|
||||||
IXML_Element *element = NULL;
|
IXML_Element *element = NULL;
|
||||||
IXML_Element *newElement = NULL;
|
|
||||||
IXML_Node *textNode = NULL;
|
IXML_Node *textNode = NULL;
|
||||||
IXML_Node *rootNode = NULL;
|
IXML_Node *rootNode = NULL;
|
||||||
IXML_Node *urlbase_node = NULL;
|
IXML_Node *urlbase_node = NULL;
|
||||||
@ -232,7 +231,6 @@ static int config_description_doc(
|
|||||||
baseList = ixmlDocument_getElementsByTagName(doc, urlBaseStr);
|
baseList = ixmlDocument_getElementsByTagName(doc, urlBaseStr);
|
||||||
if (baseList == NULL) {
|
if (baseList == NULL) {
|
||||||
/* urlbase not found -- create new one */
|
/* urlbase not found -- create new one */
|
||||||
addNew = TRUE;
|
|
||||||
element = ixmlDocument_createElement(doc, urlBaseStr);
|
element = ixmlDocument_createElement(doc, urlBaseStr);
|
||||||
if (element == NULL) {
|
if (element == NULL) {
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
@ -319,7 +317,7 @@ static int config_description_doc(
|
|||||||
|
|
||||||
error_handler:
|
error_handler:
|
||||||
if (err_code != UPNP_E_SUCCESS) {
|
if (err_code != UPNP_E_SUCCESS) {
|
||||||
ixmlElement_free(newElement);
|
ixmlElement_free(element);
|
||||||
}
|
}
|
||||||
ixmlNodeList_free(baseList);
|
ixmlNodeList_free(baseList);
|
||||||
membuffer_destroy(&root_path);
|
membuffer_destroy(&root_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user