diff --git a/ChangeLog b/ChangeLog index 00d9bb1..167fe6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ Version 1.6.18 ******************************************************************************* +2012-04-21 Yoichi NAKAYAMA + + Fix condition for allocation failure in get_content_type(). + + At the end of get_content_type() in webserver.c, it should check + return value of ixmlCloneDOMString(). + 2012-04-21 Yoichi NAKAYAMA Fix problems detected as dead assignment warning by clang scan-build. diff --git a/upnp/src/genlib/net/http/webserver.c b/upnp/src/genlib/net/http/webserver.c index 50527fc..b2c3eb8 100644 --- a/upnp/src/genlib/net/http/webserver.c +++ b/upnp/src/genlib/net/http/webserver.c @@ -344,7 +344,7 @@ static UPNP_INLINE int get_content_type( } (*content_type) = ixmlCloneDOMString(temp); free(temp); - if (!content_type) + if (!(*content_type)) return UPNP_E_OUTOF_MEMORY; return 0;