Module: kamailio
Branch: master
Commit: 0049a20fe0bf1b755bfb61853e72b341099dc63d
URL:
https://github.com/kamailio/kamailio/commit/0049a20fe0bf1b755bfb61853e72b34…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-23T14:44:00+02:00
Merge pull request #340 from doublec/sqlops_memory_leak
sqlops: Fix memory leak in error condition
---
Modified: modules/sqlops/sql_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0049a20fe0bf1b755bfb61853e72b34…
Patch:
https://github.com/kamailio/kamailio/commit/0049a20fe0bf1b755bfb61853e72b34…
---
diff --git a/modules/sqlops/sql_var.c b/modules/sqlops/sql_var.c
index f21140a..9b8721b 100644
--- a/modules/sqlops/sql_var.c
+++ b/modules/sqlops/sql_var.c
@@ -255,7 +255,9 @@ int pv_parse_dbr_name(pv_spec_p sp, str *in)
if(p>in->s+in->len || *p=='\0' || *p!=']')
goto error_index;
} else {
- LM_ERR("unknow key [%.*s]\n", pvs.len, pvs.s);
+ LM_ERR("unknown key [%.*s]\n", pvs.len, pvs.s);
+ if(spv!=NULL)
+ pkg_free(spv);
return -1;
}
sp->pvp.pvn.u.dname = (void*)spv;