aboutsummaryrefslogtreecommitdiff
path: root/src/extensions
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-07-10 10:23:52 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-07-10 10:23:52 +0200
commit3024dc9fa54e8677b4816e56f8d215556a7d5561 (patch)
treeaaf2281e1c69327d4b91565d3b75c0a6fa36165a /src/extensions
parent9d706a01a23e36e1c349d06e7a1be8bb44b7f0d5 (diff)
downloadexchange-3024dc9fa54e8677b4816e56f8d215556a7d5561.tar.xz
fix memory leaks reported by valgrind
Diffstat (limited to 'src/extensions')
-rw-r--r--src/extensions/extensions.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c
index 731ccfd08..fbbe874fb 100644
--- a/src/extensions/extensions.c
+++ b/src/extensions/extensions.c
@@ -184,7 +184,7 @@ configure_extension (
{
struct LoadConfClosure *col = cls;
const char *name;
- char *lib_name;
+ char lib_name[1024] = {0};
struct TALER_Extension *extension;
if (GNUNET_OK != col->error)
@@ -199,17 +199,16 @@ configure_extension (
/* Load the extension library */
- GNUNET_asprintf (&lib_name,
+ GNUNET_snprintf (lib_name,
+ sizeof(lib_name),
"libtaler_extension_%s",
name);
/* Lower-case extension name, config is case-insensitive */
for (unsigned int i = 0; i < strlen (lib_name); i++)
- {
lib_name[i] = tolower (lib_name[i]);
- }
- extension = GNUNET_PLUGIN_load (
- lib_name,
- (void *) col->cfg);
+
+ extension = GNUNET_PLUGIN_load (lib_name,
+ (void *) col->cfg);
if (NULL == extension)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,