aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-tools/taler-exchange-offline.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-09 09:18:35 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-09 09:18:35 +0100
commitdfc5039d9a8ab7282147500c840c721094f45f4e (patch)
tree7e1eda5c4574881dd57fd0e91d00bc9fd471c0ff /src/exchange-tools/taler-exchange-offline.c
parentbd930549fbcc185ab9f675665b77496af95e00dd (diff)
-fix leak
Diffstat (limited to 'src/exchange-tools/taler-exchange-offline.c')
-rw-r--r--src/exchange-tools/taler-exchange-offline.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c
index 3b6280c7d..3d85d376d 100644
--- a/src/exchange-tools/taler-exchange-offline.c
+++ b/src/exchange-tools/taler-exchange-offline.c
@@ -2530,7 +2530,7 @@ do_download (char *const *args)
* #GNUNET_NO if we had nothing in store but now do
* #GNUNET_SYSERR if keys changed from what we remember or other error
*/
-static int
+static enum GNUNET_GenericReturnValue
tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
{
char *fn;
@@ -2603,6 +2603,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
"SECM_ESIGN_PUBKEY",
"key malformed");
GNUNET_free (key);
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
GNUNET_free (key);
@@ -2612,6 +2613,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"ESIGN security module key does not match SECM_ESIGN_PUBKEY in configuration\n");
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
}
@@ -2634,6 +2636,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
"SECM_DENOM_PUBKEY",
"key malformed");
GNUNET_free (key);
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
GNUNET_free (key);
@@ -2643,6 +2646,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"DENOM security module key does not match SECM_DENOM_PUBKEY in configuration\n");
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
}
@@ -2665,6 +2669,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
"SECM_DENOM_CS_PUBKEY",
"key malformed");
GNUNET_free (key);
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
GNUNET_free (key);
@@ -2674,6 +2679,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"DENOM security module key does not match SECM_DENOM_CS_PUBKEY in configuration\n");
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
}
@@ -2700,6 +2706,7 @@ tofu_check (const struct TALER_SecurityModulePublicKeySetP *secmset)
GNUNET_free (fn);
return GNUNET_SYSERR;
}
+ GNUNET_free (fn);
return GNUNET_NO;
}