2
0
Эх сурвалжийг харах

xhttp: wrong variable was used for checking memory allocation

Daniel-Constantin Mierla 11 жил өмнө
parent
commit
8589936aac

+ 1 - 1
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.len=sizeof("Content-Type: ") - 1 + ctype->len + CRLF_LEN;
 		tbuf.s=pkg_malloc(sizeof(char)*(tbuf.len));
 		tbuf.s=pkg_malloc(sizeof(char)*(tbuf.len));
 
 
-		if (tbuf.len==0)
+		if (tbuf.s==0)
 		{
 		{
 			LM_ERR("out of pkg memory\n");
 			LM_ERR("out of pkg memory\n");
 			return -1;
 			return -1;