|
@@ -211,7 +211,12 @@ static char *get_hfblock(str *uri, struct hdr_field *hf, int proto,
|
|
DBG("get_hfblock: one more hf processed\n");
|
|
DBG("get_hfblock: one more hf processed\n");
|
|
} /* header loop */
|
|
} /* header loop */
|
|
|
|
|
|
- /* construct a single header block now */
|
|
|
|
|
|
+ if(total_len==0) {
|
|
|
|
+ LM_DBG("empty result for headers block\n");
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* construct a single header block now */
|
|
ret = pkg_malloc(total_len);
|
|
ret = pkg_malloc(total_len);
|
|
if (!ret) {
|
|
if (!ret) {
|
|
LOG(L_ERR, "get_hfblock: no pkg mem for hf block\n");
|
|
LOG(L_ERR, "get_hfblock: no pkg mem for hf block\n");
|