]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix ALSA/OSS leak
authorMark Spencer <markster@digium.com>
Sat, 12 Apr 2003 14:03:09 +0000 (14:03 +0000)
committerMark Spencer <markster@digium.com>
Sat, 12 Apr 2003 14:03:09 +0000 (14:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c
channels/chan_oss.c

index 9d3f89c225f1cb131d103e59695b67d4cdc60059..4ae95d3707bab59687e59c865ff117fab64c0ad4 100755 (executable)
@@ -1006,7 +1006,7 @@ int load_module()
        int res;
        int x;
        int flags;
-       struct ast_config *cfg = ast_load(config);
+       struct ast_config *cfg;
        struct ast_variable *v;
        res = pipe(cmd);
        res = pipe(sndcmd);
@@ -1039,7 +1039,7 @@ int load_module()
        }
        for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++)
                ast_cli_register(myclis + x);
-       if (cfg) {
+       if ((cfg = ast_load(config)) {
                v = ast_variable_browse(cfg, "general");
                while(v) {
                        if (!strcasecmp(v->name, "autoanswer"))
index a5de53844a72be87ef14dc952c8b52464b252b25..9f942e272cbf33d991694a8dc69188b640021563 100755 (executable)
@@ -951,7 +951,7 @@ int load_module()
 {
        int res;
        int x;
-       struct ast_config *cfg = ast_load(config);
+       struct ast_config *cfg;
        struct ast_variable *v;
        res = pipe(sndcmd);
        if (res) {
@@ -975,7 +975,7 @@ int load_module()
        }
        for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++)
                ast_cli_register(myclis + x);
-       if (cfg) {
+       if ((cfg = ast_load(config))) {
                v = ast_variable_browse(cfg, "general");
                while(v) {
                        if (!strcasecmp(v->name, "autoanswer"))