소스 검색

xhttp: wrong variable was used for checking memory allocation

Daniel-Constantin Mierla 11 년 전
부모
커밋
8589936aac
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/xhttp/xhttp_mod.c

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