From 7224f7b028016f7d7744c1b0b79c7b57f64b6b75 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 27 Oct 2009 14:01:13 +0000 Subject: [PATCH] fix regression from -run addition and better handling of -stop whoops (FSCORE-474) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15247 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/switch.c b/src/switch.c index daa887dfba..e758117f6c 100644 --- a/src/switch.c +++ b/src/switch.c @@ -635,6 +635,11 @@ int main(int argc, char *argv[]) } if (log_set && !run_set) { + SWITCH_GLOBAL_dirs.run_dir = (char *) malloc(strlen(SWITCH_GLOBAL_dirs.log_dir) + 1); + if (!SWITCH_GLOBAL_dirs.run_dir) { + fprintf(stderr, "Allocation error\n"); + return 255; + } strcpy(SWITCH_GLOBAL_dirs.run_dir, SWITCH_GLOBAL_dirs.log_dir); }