-fix leak
This commit is contained in:
parent
c3e1aa36ee
commit
bc15478c3b
@ -682,7 +682,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -700,6 +700,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file_expire_reserve_now,
|
GNUNET_asprintf (&config_file_expire_reserve_now,
|
||||||
"test_auditor_api_expire_reserve_now-%s.conf",
|
"test_auditor_api_expire_reserve_now-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
/* Check fakebank port is available and get configuration data. */
|
/* Check fakebank port is available and get configuration data. */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (config_file,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
|
@ -977,7 +977,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -994,6 +994,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file_expire_reserve_now,
|
GNUNET_asprintf (&config_file_expire_reserve_now,
|
||||||
"test_exchange_api_expire_reserve_now-%s.conf",
|
"test_exchange_api_expire_reserve_now-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
/* Check fakebank port is available and get config */
|
/* Check fakebank port is available and get config */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (config_file,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
|
@ -110,7 +110,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -124,6 +124,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file,
|
GNUNET_asprintf (&config_file,
|
||||||
"test_exchange_api_keys_cherry_picking-%s.conf",
|
"test_exchange_api_keys_cherry_picking-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
TALER_TESTING_cleanup_files (config_file);
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
|
@ -90,7 +90,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -104,6 +104,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file,
|
GNUNET_asprintf (&config_file,
|
||||||
"test_exchange_api_keys_cherry_picking-%s.conf",
|
"test_exchange_api_keys_cherry_picking-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
TALER_TESTING_cleanup_files (config_file);
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
|
@ -249,7 +249,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -263,6 +263,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file,
|
GNUNET_asprintf (&config_file,
|
||||||
"test_exchange_api-%s.conf",
|
"test_exchange_api-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
/* Check fakebank port is available and get config */
|
/* Check fakebank port is available and get config */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (config_file,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
|
@ -284,7 +284,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
@ -299,6 +299,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file,
|
GNUNET_asprintf (&config_file,
|
||||||
"test_exchange_api_twisted-%s.conf",
|
"test_exchange_api_twisted-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (config_file,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
|
@ -157,7 +157,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
const char *cipher;
|
char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
@ -172,6 +172,7 @@ main (int argc,
|
|||||||
GNUNET_asprintf (&config_file,
|
GNUNET_asprintf (&config_file,
|
||||||
"test_exchange_api-%s.conf",
|
"test_exchange_api-%s.conf",
|
||||||
cipher);
|
cipher);
|
||||||
|
GNUNET_free (cipher);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (config_file,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
|
@ -43,8 +43,6 @@
|
|||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
|
|
||||||
#define TALER_CFG_CIPHER_LEN 3
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information we keep per denomination.
|
* Information we keep per denomination.
|
||||||
*/
|
*/
|
||||||
@ -1383,14 +1381,12 @@ load_denominations (void *cls,
|
|||||||
"CIPHER");
|
"CIPHER");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strlen (cipher) > TALER_CFG_CIPHER_LEN)
|
|
||||||
{
|
|
||||||
return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */
|
|
||||||
}
|
|
||||||
if (0 != strcmp (cipher, "CS"))
|
if (0 != strcmp (cipher, "CS"))
|
||||||
{
|
{
|
||||||
|
GNUNET_free (cipher);
|
||||||
return; /* Ignore denominations of other types than CS*/
|
return; /* Ignore denominations of other types than CS*/
|
||||||
}
|
}
|
||||||
|
GNUNET_free (cipher);
|
||||||
|
|
||||||
denom = GNUNET_new (struct Denomination);
|
denom = GNUNET_new (struct Denomination);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "secmod_common.h"
|
#include "secmod_common.h"
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
#define TALER_CFG_CIPHER_LEN 3
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information we keep per denomination.
|
* Information we keep per denomination.
|
||||||
@ -1361,14 +1360,12 @@ load_denominations (void *cls,
|
|||||||
"CIPHER");
|
"CIPHER");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strlen (cipher) > TALER_CFG_CIPHER_LEN)
|
|
||||||
{
|
|
||||||
return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */
|
|
||||||
}
|
|
||||||
if (0 != strcmp (cipher, "RSA"))
|
if (0 != strcmp (cipher, "RSA"))
|
||||||
{
|
{
|
||||||
|
GNUNET_free (cipher);
|
||||||
return; /* Ignore denominations of other types than CS */
|
return; /* Ignore denominations of other types than CS */
|
||||||
}
|
}
|
||||||
|
GNUNET_free (cipher);
|
||||||
denom = GNUNET_new (struct Denomination);
|
denom = GNUNET_new (struct Denomination);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
parse_denomination_cfg (ctx->cfg,
|
parse_denomination_cfg (ctx->cfg,
|
||||||
|
Loading…
Reference in New Issue
Block a user