Skip to content

Commit

Permalink
mi_script: Check return code
Browse files Browse the repository at this point in the history
CID #417719, #417510
  • Loading branch information
oanatitoc committed Sep 27, 2024
1 parent 0a48fdc commit aeb89f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/mi_script/mi_script.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ static int mi_script_func(struct sip_msg *msg, str *m,
if (r) {
init_str(&val.rs, err);
val.flags = PV_VAL_STR;
pv_set_value(msg, r, 0, &val);
if (pv_set_value(msg, r, 0, &val) < 0)
ret = -3;
}
ret:
if (req)
Expand Down Expand Up @@ -762,7 +763,8 @@ static int mi_script_async_func(struct sip_msg *msg, async_ctx *ctx,
if (r) {
init_str(&val.rs, err);
val.flags = PV_VAL_STR;
pv_set_value(msg, r, 0, &val);
if (pv_set_value(msg, r, 0, &val) < 0)
return -3;
}
mi_script_free_request(req, 1);
return -2;
Expand Down

0 comments on commit aeb89f6

Please sign in to comment.