Skip to content

Commit a0b69ed

Browse files
authored
Merge pull request #2043 from l2dy/exec-check
exec: fix NULL check after malloc
2 parents f103dd4 + 8d7e2f3 commit a0b69ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exec/exec_mod.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ static struct hf_wrapper* get_avp_values_list(struct sip_msg* msg, pv_param_p av
226226

227227
while ((avp_ptr = search_next_avp( avp_ptr, &value)) != 0) {
228228
hf->next_other=pkg_malloc(sizeof(struct hf_wrapper));
229+
hf=hf->next_other;
230+
229231
if (!hf)
230232
goto memerr;
231233

232-
hf=hf->next_other;
233-
234234
setenvvar(&hf, &value, (avp_ptr->flags & AVP_VAL_STR), idx++);
235235
}
236236

0 commit comments

Comments
 (0)