提交 926bea44 authored 作者: Anthony Minessale's avatar Anthony Minessale

valgrind tweaks

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@600 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 5bf08ed3
...@@ -85,7 +85,7 @@ static int switch_console_process(char *cmd) ...@@ -85,7 +85,7 @@ static int switch_console_process(char *cmd)
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line, SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line,
char *fmt, ...) char *fmt, ...)
{ {
char *data; char *data = NULL;
int ret = 0; int ret = 0;
va_list ap; va_list ap;
FILE *handle; FILE *handle;
...@@ -130,9 +130,11 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *fi ...@@ -130,9 +130,11 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *fi
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Log-Line", "%d", line); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Log-Line", "%d", line);
switch_event_fire(&event); switch_event_fire(&event);
} }
free(data);
} }
} }
if(data) {
free(data);
}
fflush(handle); fflush(handle);
} }
......
...@@ -98,13 +98,13 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_mem ...@@ -98,13 +98,13 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_mem
{ {
switch_loadable_module *module = NULL; switch_loadable_module *module = NULL;
apr_dso_handle_t *dso = NULL; apr_dso_handle_t *dso = NULL;
apr_status_t status; apr_status_t status = SWITCH_STATUS_SUCCESS;
apr_dso_handle_sym_t function_handle = NULL; apr_dso_handle_sym_t function_handle = NULL;
switch_status (*load_func_ptr) (switch_loadable_module_interface **, char *) = NULL; switch_status (*load_func_ptr) (switch_loadable_module_interface **, char *) = NULL;
int loading = 1; int loading = 1;
const char *err = NULL; const char *err = NULL;
switch_loadable_module_interface *interface = NULL; switch_loadable_module_interface *interface = NULL;
char derr[512]; char derr[512] = "";
assert(filename != NULL); assert(filename != NULL);
...@@ -190,13 +190,13 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_mem ...@@ -190,13 +190,13 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_mem
SWITCH_DECLARE(switch_status) switch_loadable_module_init() SWITCH_DECLARE(switch_status) switch_loadable_module_init()
{ {
char *file; char *file = NULL;
size_t len; size_t len = 0;
char *ptr; char *ptr = NULL;
apr_finfo_t finfo; apr_finfo_t finfo = {0};
apr_dir_t *module_dir_handle; apr_dir_t *module_dir_handle = NULL;
apr_int32_t finfo_flags = APR_FINFO_DIRENT | APR_FINFO_TYPE | APR_FINFO_NAME; apr_int32_t finfo_flags = APR_FINFO_DIRENT | APR_FINFO_TYPE | APR_FINFO_NAME;
switch_loadable_module *new_module; switch_loadable_module *new_module = NULL;
#ifdef WIN32 #ifdef WIN32
const char *ext = ".dll"; const char *ext = ".dll";
const char *EXT = ".DLL"; const char *EXT = ".DLL";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论