Module: kamailio
Branch: master
Commit: 1051a1bbc70cf84d6ebd7aa76a9b1ebd2e17e710
URL:
https://github.com/kamailio/kamailio/commit/1051a1bbc70cf84d6ebd7aa76a9b1eb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-28T09:10:04+02:00
htable: close db connection in some error cases for rpc command
---
Modified: src/modules/htable/htable.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1051a1bbc70cf84d6ebd7aa76a9b1eb…
Patch:
https://github.com/kamailio/kamailio/commit/1051a1bbc70cf84d6ebd7aa76a9b1eb…
---
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
index 18a3ab8..f4c4e96 100644
--- a/src/modules/htable/htable.c
+++ b/src/modules/htable/htable.c
@@ -1064,12 +1064,14 @@ static void htable_rpc_reload(rpc_t* rpc, void* c)
if (rpc->scan(c, "S", &htname) < 1)
{
+ ht_db_close_con();
rpc->fault(c, 500, "No htable name given");
return;
}
ht = ht_get_table(&htname);
if(ht==NULL)
{
+ ht_db_close_con();
rpc->fault(c, 500, "No such htable");
return;
}