From b719c5250c8364667a700fa0ca4ffb495d02774f Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 14 Nov 2010 23:10:10 +0100 Subject: [PATCH] Memleak: fix the varous handler & config lists of the rss module on exit. --- citadel/modules/rssclient/serv_rssclient.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/citadel/modules/rssclient/serv_rssclient.c b/citadel/modules/rssclient/serv_rssclient.c index 33e333513..13156ba0d 100644 --- a/citadel/modules/rssclient/serv_rssclient.c +++ b/citadel/modules/rssclient/serv_rssclient.c @@ -1539,6 +1539,14 @@ void LoadUrlShorteners(void) close(fd); } +void rss_cleanup(void) +{ + DeleteHash(&StartHandlers); + DeleteHash(&EndHandlers); + DeleteHash(&UrlShorteners); + DeleteHash(&KnownNameSpaces); +} + CTDL_MODULE_INIT(rssclient) { if (threading) @@ -1632,6 +1640,7 @@ CTDL_MODULE_INIT(rssclient) /* we don't like these namespaces because of they shadow our usefull parameters. */ Put(KnownNameSpaces, HKEY("http://search.yahoo.com/mrss/"), NULL, reference_free_handler); #endif + CtdlRegisterCleanupHook(rss_cleanup); } return "rssclient"; } -- 2.39.2