sqlops: free allocated pv list in case of error inside fixup_sql_pvquery()
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:56:58 +0000 (08:56 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:56:58 +0000 (08:56 +0200)
src/modules/sqlops/sqlops.c

index ce3f873..502819e 100644 (file)
@@ -391,6 +391,7 @@ static int fixup_sql_pvquery(void** param, int param_no)
                        if (pvl->sname.setf == NULL)
                        {
                                LM_ERR("result variable [%d] is read-only\n", i);
+                               free_pvname_list(res);
                                return E_UNSPEC;
                        }
                        i++;