From 87738d313872a5675fcc5f9227c4bc3092ead692 Mon Sep 17 00:00:00 2001 From: "oljas.jarasbaev" <oljas.jarasbaev@demlabs.net> Date: Wed, 7 Aug 2024 05:43:39 +0000 Subject: [PATCH] Feature 12444 --- dap-sdk | 2 +- modules/wallet/dap_chain_wallet.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dap-sdk b/dap-sdk index 0e4b729ab6..b67c2d87d3 160000 --- a/dap-sdk +++ b/dap-sdk @@ -1 +1 @@ -Subproject commit 0e4b729ab659a7fc882b6df526cf2b9f87cdaaeb +Subproject commit b67c2d87d32ec7f3575caef58b664adb1771fdc2 diff --git a/modules/wallet/dap_chain_wallet.c b/modules/wallet/dap_chain_wallet.c index 0336838aeb..c341711cdb 100644 --- a/modules/wallet/dap_chain_wallet.c +++ b/modules/wallet/dap_chain_wallet.c @@ -359,11 +359,13 @@ const char* dap_chain_wallet_get_path(dap_config_t * a_config) return s_wallets_path; /* Fine, just return existen value */ /* Retrieve Wallet's store path from config */ - if ( !(l_cp = (char *) dap_config_get_item_str(a_config, "resources", "wallets_path")) ) + if ( !(l_cp = dap_config_get_item_str_path_default(a_config, "resources", "wallets_path", NULL)) ) 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