diff --git a/ChangeLog b/ChangeLog index ad1a3e9..a803c0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -299,6 +299,16 @@ Version 1.8.0 Version 1.6.16 ******************************************************************************* +2012-02-28 Fabrice Fontaine + + SF Bug Tracker id 3495280 - Memory leak in ixmlDocument_createElementEx + + Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:01:02 PST + + There is a memory leak in ixmlDocument_createElementEx: + newElement->tagName is not freed if + newElement->n.nodeName = strdup(tagName); returns NULL. + 2012-02-27 Fabrice Fontaine SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline diff --git a/ixml/src/document.c b/ixml/src/document.c index eeec48f..be98383 100644 --- a/ixml/src/document.c +++ b/ixml/src/document.c @@ -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: @@ -143,6 +144,7 @@ int ixmlDocument_createElementEx( newElement->n.nodeType = eELEMENT_NODE; newElement->n.nodeName = strdup(tagName); if (newElement->n.nodeName == NULL) { + free(newElement->tagName); ixmlElement_free(newElement); newElement = NULL; errCode = IXML_INSUFFICIENT_MEMORY;