Module: kamailio Branch: master Commit: 460e0a6077d69cf74ceb4b095195b683fb49269c URL: https://github.com/kamailio/kamailio/commit/460e0a6077d69cf74ceb4b095195b683fb49269c
Author: Chris Double <[email protected]> Committer: Chris Double <[email protected]> Date: 2015-09-23T22:17:21+12:00 sqlops: Don't pkg_free memory that wasn't pkg_malloc'd - Don't pkg_free the gparam_t parameter of sql_parse_index. When called within pv_parse_dbr_name that parameter is an internal field in the sql_pv_t structure and wasn't allocated with pkg_malloc. --- Modified: modules/sqlops/sql_var.c --- Diff: https://github.com/kamailio/kamailio/commit/460e0a6077d69cf74ceb4b095195b683fb49269c.diff Patch: https://github.com/kamailio/kamailio/commit/460e0a6077d69cf74ceb4b095195b683fb49269c.patch --- diff --git a/modules/sqlops/sql_var.c b/modules/sqlops/sql_var.c index 940ec5a..f21140a 100644 --- a/modules/sqlops/sql_var.c +++ b/modules/sqlops/sql_var.c @@ -104,7 +104,6 @@ int sql_parse_index(str *in, gparam_t *gp) if (gp->v.pvs == NULL) { LM_ERR("no pkg memory left for pv_spec_t\n"); - pkg_free(gp); return -1; } @@ -112,7 +111,6 @@ int sql_parse_index(str *in, gparam_t *gp) { LM_ERR("invalid PV identifier\n"); pkg_free(gp->v.pvs); - pkg_free(gp); return -1; } } else { _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
