Merged revisions 89088 via svnmerge from
authorSteve Murphy <murf@digium.com>
Wed, 7 Nov 2007 22:09:10 +0000 (22:09 +0000)
committerSteve Murphy <murf@digium.com>
Wed, 7 Nov 2007 22:09:10 +0000 (22:09 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89088 | murf | 2007-11-07 14:40:28 -0700 (Wed, 07 Nov 2007) | 1 line

In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89089 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr/cdr_tds.c
res/res_jabber.c

index af58b86..4acd535 100644 (file)
@@ -441,9 +441,11 @@ static int tds_load_module(int reload)
                return 0;
 
        var = ast_variable_browse(cfg, "global");
-       if (!var) /* nothing configured */
+       if (!var) /* nothing configured */ {
+               ast_config_destroy(cfg);
                return 0;
-
+       }
+       
        ptr = ast_variable_retrieve(cfg, "global", "hostname");
        if (ptr) {
                if (hostname)
index 7bd9601..c4d626c 100644 (file)
@@ -2867,6 +2867,7 @@ static int aji_load_config(int reload)
                }
                cat = ast_category_browse(cfg, cat);
        }
+       ast_config_destroy(cfg); /* or leak memory */
        return 1;
 }