Module: kamailio
Branch: master
Commit: 2316b90fc22ab8b020d26b9c928f6e6e0fd0a885
URL:
https://github.com/kamailio/kamailio/commit/2316b90fc22ab8b020d26b9c928f6e6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-23T14:43:06+02:00
Merge pull request #339 from doublec/sqlops_bad_free
sqlops: Don't pkg_free memory that wasn't pkg_malloc'd
---
Modified: modules/sqlops/sql_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2316b90fc22ab8b020d26b9c928f6e6…
Patch:
https://github.com/kamailio/kamailio/commit/2316b90fc22ab8b020d26b9c928f6e6…
---
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 {