-fix leak

This commit is contained in:
Christian Grothoff 2022-02-09 09:25:32 +01:00
parent c3e1aa36ee
commit bc15478c3b
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
9 changed files with 18 additions and 18 deletions

View File

@ -682,7 +682,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -700,6 +700,7 @@ main (int argc,
GNUNET_asprintf (&config_file_expire_reserve_now,
"test_auditor_api_expire_reserve_now-%s.conf",
cipher);
GNUNET_free (cipher);
/* Check fakebank port is available and get configuration data. */
if (GNUNET_OK !=
TALER_TESTING_prepare_fakebank (config_file,

View File

@ -977,7 +977,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -994,6 +994,7 @@ main (int argc,
GNUNET_asprintf (&config_file_expire_reserve_now,
"test_exchange_api_expire_reserve_now-%s.conf",
cipher);
GNUNET_free (cipher);
/* Check fakebank port is available and get config */
if (GNUNET_OK !=
TALER_TESTING_prepare_fakebank (config_file,

View File

@ -110,7 +110,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -124,6 +124,7 @@ main (int argc,
GNUNET_asprintf (&config_file,
"test_exchange_api_keys_cherry_picking-%s.conf",
cipher);
GNUNET_free (cipher);
TALER_TESTING_cleanup_files (config_file);
/* @helpers. Run keyup, create tables, ... Note: it
* fetches the port number from config in order to see

View File

@ -90,7 +90,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -104,6 +104,7 @@ main (int argc,
GNUNET_asprintf (&config_file,
"test_exchange_api_keys_cherry_picking-%s.conf",
cipher);
GNUNET_free (cipher);
TALER_TESTING_cleanup_files (config_file);
/* @helpers. Run keyup, create tables, ... Note: it
* fetches the port number from config in order to see

View File

@ -249,7 +249,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -263,6 +263,7 @@ main (int argc,
GNUNET_asprintf (&config_file,
"test_exchange_api-%s.conf",
cipher);
GNUNET_free (cipher);
/* Check fakebank port is available and get config */
if (GNUNET_OK !=
TALER_TESTING_prepare_fakebank (config_file,

View File

@ -284,7 +284,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
int ret;
(void) argc;
@ -299,6 +299,7 @@ main (int argc,
GNUNET_asprintf (&config_file,
"test_exchange_api_twisted-%s.conf",
cipher);
GNUNET_free (cipher);
if (GNUNET_OK !=
TALER_TESTING_prepare_fakebank (config_file,
"exchange-account-2",

View File

@ -157,7 +157,7 @@ int
main (int argc,
char *const *argv)
{
const char *cipher;
char *cipher;
(void) argc;
/* These environment variables get in the way... */
@ -172,6 +172,7 @@ main (int argc,
GNUNET_asprintf (&config_file,
"test_exchange_api-%s.conf",
cipher);
GNUNET_free (cipher);
if (GNUNET_OK !=
TALER_TESTING_prepare_fakebank (config_file,
"exchange-account-2",

View File

@ -43,8 +43,6 @@
#include <poll.h>
#define TALER_CFG_CIPHER_LEN 3
/**
* Information we keep per denomination.
*/
@ -1383,14 +1381,12 @@ load_denominations (void *cls,
"CIPHER");
return;
}
if (strlen (cipher) > TALER_CFG_CIPHER_LEN)
{
return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */
}
if (0 != strcmp (cipher, "CS"))
{
GNUNET_free (cipher);
return; /* Ignore denominations of other types than CS*/
}
GNUNET_free (cipher);
denom = GNUNET_new (struct Denomination);
if (GNUNET_OK !=

View File

@ -41,7 +41,6 @@
#include "secmod_common.h"
#include <poll.h>
#define TALER_CFG_CIPHER_LEN 3
/**
* Information we keep per denomination.
@ -1361,14 +1360,12 @@ load_denominations (void *cls,
"CIPHER");
return;
}
if (strlen (cipher) > TALER_CFG_CIPHER_LEN)
{
return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */
}
if (0 != strcmp (cipher, "RSA"))
{
GNUNET_free (cipher);
return; /* Ignore denominations of other types than CS */
}
GNUNET_free (cipher);
denom = GNUNET_new (struct Denomination);
if (GNUNET_OK !=
parse_denomination_cfg (ctx->cfg,