]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix possible memory leak in switch_console_complete()
authorAndrey Volk <andywolk@gmail.com>
Tue, 6 Apr 2021 20:06:45 +0000 (23:06 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:39:37 +0000 (20:39 +0300)
src/switch_console.c

index ec891d44b4bbbb1506468ec8ff5754977b816e71..2de5ac27ab3ef1720bd81f91503d342a0b83194c 100644 (file)
@@ -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;
        }