From 8201f54a2c07fd3873a7f2a7446b889676550a66 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Tue, 6 Apr 2021 23:06:45 +0300 Subject: [PATCH] [Core] Fix possible memory leak in switch_console_complete() --- src/switch_console.c | 1 + 1 file changed, 1 insertion(+) 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; }