From: Brian West Date: Thu, 13 May 2010 03:18:48 +0000 (-0500) Subject: fix double error message on display api X-Git-Tag: git2svn-syncpoint-master~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6c479f0280131cb58cf256d3639c0a4e968c955;p=thirdparty%2Ffreeswitch.git fix double error message on display api --- diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index bc2d55741d..500f35c44d 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -2302,6 +2302,7 @@ SWITCH_STANDARD_API(uuid_display_function) if (zstr(cmd) || argc < 2 || zstr(argv[0]) || zstr(argv[1])) { stream->write_function(stream, "-USAGE: %s\n", DISPLAY_SYNTAX); + goto end; } else { switch_core_session_message_t msg = { 0 }; switch_core_session_t *lsession = NULL; @@ -2322,6 +2323,8 @@ SWITCH_STANDARD_API(uuid_display_function) stream->write_function(stream, "-ERR Operation Failed\n"); } + end: + switch_safe_free(mycmd); return SWITCH_STATUS_SUCCESS; }