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().
This commit is contained in:
Yoichi NAKAYAMA 2012-04-21 21:48:55 +09:00
parent 39dfad2cba
commit 708ea30806
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,13 @@
Version 1.6.18
*******************************************************************************
2012-04-21 Yoichi NAKAYAMA <yoichi.nakayama(at)gmail.com>
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 <yoichi.nakayama(at)gmail.com>
Fix problems detected as dead assignment warning by clang scan-build.

View File

@ -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;