]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix 2 memory leaks
authorJames Golovich <james@gnuinter.net>
Mon, 27 Sep 2004 05:06:22 +0000 (05:06 +0000)
committerJames Golovich <james@gnuinter.net>
Mon, 27 Sep 2004 05:06:22 +0000 (05:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3844 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_alarmreceiver.c
apps/app_festival.c

index 2d9c264c05c075e7b0b43feda7bd4eb94865fadd..28d28b4c43192d58046c580e6b5fce4b3633a113 100755 (executable)
@@ -817,7 +817,7 @@ static int load_config(void)
                        strncpy(db_family, p, sizeof(db_family) - 1);
                        db_family[sizeof(db_family) - 1] = '\0';
                }
-
+               ast_destroy(cfg);
        }
        return 0;
 
index 82908f05017f7ff5d6d069809793ec5c653cbdc0..e7e0bd42697a9cac6e633b2494a11f77fa9bbb2f 100755 (executable)
@@ -305,6 +305,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
        if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
                festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
        }
+       ast_destroy(cfg);
        if (!vdata || ast_strlen_zero(vdata)) {
                ast_log(LOG_WARNING, "festival requires an argument (text)\n");
                return -1;