From 8855493ec9eaf3b3caa6c8a74569e9306ced36e3 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 4 Aug 2010 17:47:44 +0000 Subject: [PATCH] 2010-08-04 Ramon Novoa * modules/pandora_module.cc: Free the collection if it can not be added to the list. * Makefile.am: Use -static-libgcc to remove the dependency on libgcc_s_sjlj-1.dll. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3101 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/win32/ChangeLog | 8 ++++++++ pandora_agents/win32/Makefile.am | 2 +- pandora_agents/win32/modules/pandora_module.cc | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index 72f2c027ce..2454eb900c 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,3 +1,11 @@ +2010-08-04 Ramon Novoa + + * modules/pandora_module.cc: Free the collection if it can not + be added to the list. + + * Makefile.am: Use -static-libgcc to remove the dependency on + libgcc_s_sjlj-1.dll. + 2010-08-04 Ramon Novoa * modules/pandora_module.cc: Run action commands through cmd.exe. diff --git a/pandora_agents/win32/Makefile.am b/pandora_agents/win32/Makefile.am index 7718b5ba52..04f25eeb13 100644 --- a/pandora_agents/win32/Makefile.am +++ b/pandora_agents/win32/Makefile.am @@ -6,7 +6,7 @@ else PandoraAgent_SOURCES = misc/pandora_file.cc modules/pandora_data.cc modules/pandora_module_factory.cc modules/pandora_module.cc modules/pandora_module_list.cc modules/pandora_module_plugin.cc modules/pandora_module_inventory.cc modules/pandora_module_freememory.cc modules/pandora_module_exec.cc modules/pandora_module_odbc.cc modules/pandora_module_perfcounter.cc modules/pandora_module_proc.cc modules/pandora_module_tcpcheck.cc modules/pandora_module_freememory_percent.cc modules/pandora_module_freedisk.cc modules/pandora_module_freedisk_percent.cc modules/pandora_module_logevent.cc modules/pandora_module_service.cc modules/pandora_module_cpuusage.cc modules/pandora_module_wmiquery.cc modules/pandora_module_regexp.cc udp_server/udp_server.cc main.cc pandora_strutils.cc pandora.cc windows_service.cc pandora_agent_conf.cc windows/pandora_windows_info.cc windows/pandora_wmi.cc pandora_windows_service.cc misc/md5.c windows/wmi/disphelper.c ssh/libssh2/channel.c ssh/libssh2/mac.c ssh/libssh2/session.c ssh/libssh2/comp.c ssh/libssh2/misc.c ssh/libssh2/sftp.c ssh/libssh2/crypt.c ssh/libssh2/packet.c ssh/libssh2/userauth.c ssh/libssh2/hostkey.c ssh/libssh2/publickey.c ssh/libssh2/kex.c ssh/libssh2/scp.c ssh/pandora_ssh_client.cc ssh/pandora_ssh_test.cc ftp/pandora_ftp_client.cc ftp/pandora_ftp_test.cc PandoraAgent_CXXFLAGS=-O2 -DCURL_STATICLIB endif -PandoraAgent_LDFLAGS=-enable-auto-import +PandoraAgent_LDFLAGS=-enable-auto-import -static-libgcc LDADD = versioninfo.res diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index 12138f9c25..93abf9c664 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -668,6 +668,8 @@ Pandora_Module::addCondition (string condition) { this->condition_list->push_back (cond); } else { pandoraDebug ("Invalid module condition: %s", condition.c_str ()); + delete (cond); + return; } /* Run commands through cmd.exe */