From: Andrey Volk Date: Tue, 6 Apr 2021 20:06:45 +0000 (+0300) Subject: [Core] Fix possible memory leak in switch_console_complete() X-Git-Tag: v1.10.7^2~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8201f54a2c07fd3873a7f2a7446b889676550a66;p=thirdparty%2Ffreeswitch.git [Core] Fix possible memory leak in switch_console_complete() --- diff --git a/src/switch_console.c b/src/switch_console.c index ec891d44b4..2de5ac27ab 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -722,6 +722,7 @@ SWITCH_DECLARE(unsigned char) switch_console_complete(const char *line, const ch if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error\n"); + switch_safe_free(dup); return CC_ERROR; }