]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
prevent a segfault in mod_basic if someone calls basic from CLI w/ no args
authorKen Rice <krice@freeswitch.org>
Tue, 1 Apr 2014 13:57:15 +0000 (08:57 -0500)
committerKen Rice <krice@freeswitch.org>
Tue, 1 Apr 2014 13:57:15 +0000 (08:57 -0500)
src/mod/languages/mod_basic/mod_basic.c

index 89795926c6093a09bbd40a65df67ed8ad621bd6d..4e62d197901d1eea67f44a7c77c246c174cd2849 100644 (file)
@@ -319,6 +319,7 @@ SWITCH_STANDARD_APP(basic_function)
 
        if (zstr(file)) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "missing file\n");
+               goto DONE;
        }
 
        if (!switch_is_file_path(file)) {
@@ -347,7 +348,8 @@ SWITCH_STANDARD_APP(basic_function)
        }
 
        mb_close(&bi);
-       
+
+DONE:
        switch_safe_free(fdup);
        switch_safe_free(mydata);
 }