summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-10 14:46:47 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-10 14:46:47 +0100
commit9cc963926bad3de9a78df51a19456f419c34492a (patch)
tree5321d74ead5891f138f6919a81dfd672e91b6a78 /plugins
parent225aa0e367a604d3891bba13d470bfacc3dfe544 (diff)
downloadrsyslog-9cc963926bad3de9a78df51a19456f419c34492a.tar.gz
rsyslog-9cc963926bad3de9a78df51a19456f419c34492a.tar.xz
rsyslog-9cc963926bad3de9a78df51a19456f419c34492a.zip
bugfix: minor memory leak in omlibdbi (< 1k per instance and run)
also testbench improvement (omlibdbi now also receives a couple of tests if we have a life MySQL server).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omlibdbi/omlibdbi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/omlibdbi/omlibdbi.c b/plugins/omlibdbi/omlibdbi.c
index f49bef42..7fcf9631 100644
--- a/plugins/omlibdbi/omlibdbi.c
+++ b/plugins/omlibdbi/omlibdbi.c
@@ -108,6 +108,11 @@ static void closeConn(instanceData *pData)
BEGINfreeInstance
CODESTARTfreeInstance
closeConn(pData);
+ free(pData->drvrName);
+ free(pData->host);
+ free(pData->usrName);
+ free(pData->pwd);
+ free(pData->dbName);
ENDfreeInstance
@@ -171,7 +176,8 @@ static rsRetVal initConn(instanceData *pData, int bSilent)
errmsg.LogError(0, RS_RET_SUSPENDED, "libdbi error: libdbi or libdbi drivers not present on this system - suspending.");
ABORT_FINALIZE(RS_RET_SUSPENDED);
} else if(iDrvrsLoaded < 0) {
- errmsg.LogError(0, RS_RET_SUSPENDED, "libdbi error: libdbi could not be initialized - suspending.");
+ errmsg.LogError(0, RS_RET_SUSPENDED, "libdbi error: libdbi could not be "
+ "initialized (do you have any dbi drivers installed?) - suspending.");
ABORT_FINALIZE(RS_RET_SUSPENDED);
}
bDbiInitialized = 1; /* we are done for the rest of our existence... */
@@ -367,6 +373,7 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(omsdRegCFSLineHdlr( (uchar *)"actionlibdbipassword", 0, eCmdHdlrGetWord, NULL, &pwd, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr( (uchar *)"actionlibdbidbname", 0, eCmdHdlrGetWord, NULL, &dbName, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr( (uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
+ DBGPRINTF("omlibdbi compiled with version %s loaded, libdbi version %s\n", VERSION, dbi_version());
ENDmodInit
/* vim:set ai: