From 37580a25694d5e5b0b4c89a92d1ba2d8b77aacba Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 8 Feb 2022 08:06:02 +0100 Subject: [PATCH] xhttp_pi: wrap freeing and setting to null in curly braces - GH #3012 --- src/modules/xhttp_pi/xhttp_pi_fnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/xhttp_pi/xhttp_pi_fnc.c b/src/modules/xhttp_pi/xhttp_pi_fnc.c index a11b3f40a23..96f1707649c 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",