[sr-dev] git:5.5:56d9073e: xhttp_pi: wrap freeing and setting to null in curly braces
Daniel-Constantin Mierla
miconda at gmail.com
Mon Feb 14 15:03:43 CET 2022
Module: kamailio
Branch: 5.5
Commit: 56d9073ef2dd61f6ab48602fe2af77e3c090e290
URL: https://github.com/kamailio/kamailio/commit/56d9073ef2dd61f6ab48602fe2af77e3c090e290
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-14T13:02:17+01:00
xhttp_pi: wrap freeing and setting to null in curly braces
- GH #3012
(cherry picked from commit 37580a25694d5e5b0b4c89a92d1ba2d8b77aacba)
---
Modified: src/modules/xhttp_pi/xhttp_pi_fnc.c
---
Diff: https://github.com/kamailio/kamailio/commit/56d9073ef2dd61f6ab48602fe2af77e3c090e290.diff
Patch: https://github.com/kamailio/kamailio/commit/56d9073ef2dd61f6ab48602fe2af77e3c090e290.patch
---
diff --git a/src/modules/xhttp_pi/xhttp_pi_fnc.c b/src/modules/xhttp_pi/xhttp_pi_fnc.c
index 5610e319bb..f5c2fdd78b 100644
--- a/src/modules/xhttp_pi/xhttp_pi_fnc.c
+++ b/src/modules/xhttp_pi/xhttp_pi_fnc.c
@@ -2901,7 +2901,7 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
case 0:
LM_ERR("no record on clause key [%.*s]\n",
command->c_keys[0]->len, command->c_keys[0]->s);
- if(c_vals) pkg_free(c_vals); c_vals = NULL;
+ if(c_vals) { pkg_free(c_vals); c_vals = NULL; }
goto finish_page;
case 1:
LM_DBG("got [%d] rows for key [%.*s]\n",
More information about the sr-dev
mailing list