Module: sip-router
Branch: master
Commit: 8589936aac4a6341b4d56bfe2ed7d4d90a169d56
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8589936…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 21 21:41:00 2014 +0200
xhttp: wrong variable was used for checking memory allocation
---
modules/xhttp/xhttp_mod.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/xhttp/xhttp_mod.c b/modules/xhttp/xhttp_mod.c
index 9848892..eea8bda 100644
--- a/modules/xhttp/xhttp_mod.c
+++ b/modules/xhttp/xhttp_mod.c
@@ -385,7 +385,7 @@ static int xhttp_send_reply(sip_msg_t *msg, int code, str *reason,
tbuf.len=sizeof("Content-Type: ") - 1 + ctype->len + CRLF_LEN;
tbuf.s=pkg_malloc(sizeof(char)*(tbuf.len));
- if (tbuf.len==0)
+ if (tbuf.s==0)
{
LM_ERR("out of pkg memory\n");
return -1;