Module: sip-router Branch: master Commit: 49720ce99e72ded34c67a9ee4d17a9cedaf0a0f4 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=49720ce99e72ded34c67a9ee4d17a9cedaf0a0f4
Author: Hugh Waite <[email protected]> Committer: Hugh Waite <[email protected]> Date: Wed Oct 2 10:04:35 2013 +0100 xcap_server: Fix memory allocation check bug in xcap_misc - Would cause crash if out of package memory --- modules/xcap_server/xcap_misc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/xcap_server/xcap_misc.c b/modules/xcap_server/xcap_misc.c index d947e7c..7ca891e 100644 --- a/modules/xcap_server/xcap_misc.c +++ b/modules/xcap_server/xcap_misc.c @@ -586,7 +586,7 @@ int xcaps_xpath_set(str *inbuf, str *xpaths, str *val, str *outbuf) goto error; } outbuf->s = (char*)pkg_malloc(size+1); - if(size<=0) + if(outbuf->s==NULL) { LM_ERR("no pkg for output\n"); xmlFree(xmem); _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
