From bf03abd52177f569c9fa4e14ef92f36e428189ca Mon Sep 17 00:00:00 2001 From: Olzhas <oljas.jarasbaev@demlabs.net> Date: Thu, 25 Jul 2024 12:09:35 +0700 Subject: [PATCH] [*] fix leak --- modules/wallet/dap_chain_wallet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/wallet/dap_chain_wallet.c b/modules/wallet/dap_chain_wallet.c index faca7e499f..2dcf830f13 100644 --- a/modules/wallet/dap_chain_wallet.c +++ b/modules/wallet/dap_chain_wallet.c @@ -363,7 +363,9 @@ const char* dap_chain_wallet_get_path(dap_config_t * a_config) return log_it(L_WARNING, "No path to wallet's store has been defined"), l_cp; - return strncpy(s_wallets_path, l_cp, sizeof(s_wallets_path) - 1 ); /* Make local copy , return it to caller */ + strncpy(s_wallets_path, l_cp, sizeof(s_wallets_path) - 1 ); /* Make local copy , return it to caller */ + DAP_DEL_Z(l_cp); + return s_wallets_path; } /** -- GitLab