Module: kamailio
Branch: master
Commit: cdf2976b856d63b07ed80d64d37626e1c7031b30
URL:
https://github.com/kamailio/kamailio/commit/cdf2976b856d63b07ed80d64d37626e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-30T18:23:39+01:00
db_text: close file stream in case of error reading table file
---
Modified: src/modules/db_text/dbt_file.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cdf2976b856d63b07ed80d64d37626e…
Patch:
https://github.com/kamailio/kamailio/commit/cdf2976b856d63b07ed80d64d37626e…
---
diff --git a/src/modules/db_text/dbt_file.c b/src/modules/db_text/dbt_file.c
index 21693fd..4dfa9f5 100644
--- a/src/modules/db_text/dbt_file.c
+++ b/src/modules/db_text/dbt_file.c
@@ -489,6 +489,8 @@ dbt_table_p dbt_load_file(const str *tbn, const str *dbn)
LM_DBG("error at row=%d col=%d c=%c\n", crow+1, ccol+1, c);
if(dtp)
dbt_table_free(dtp);
+ if(fin)
+ fclose(fin);
if(buf)
pkg_free(buf);
return NULL;