diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-09 09:25:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-09 09:25:32 +0100 |
commit | bc15478c3b918a3f1cc128033ab8888f251143b2 (patch) | |
tree | 48bf18cfa2d5fa6e4dcc7c95deda4991937caca8 /src/util | |
parent | c3e1aa36ee671ae9c1078e7cc7e625d59e3bd008 (diff) |
-fix leak
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/taler-exchange-secmod-cs.c | 8 | ||||
-rw-r--r-- | src/util/taler-exchange-secmod-rsa.c | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/util/taler-exchange-secmod-cs.c b/src/util/taler-exchange-secmod-cs.c index 5446c70f7..17fb23b3d 100644 --- a/src/util/taler-exchange-secmod-cs.c +++ b/src/util/taler-exchange-secmod-cs.c @@ -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 != diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c index ba6ee978f..06c42a028 100644 --- a/src/util/taler-exchange-secmod-rsa.c +++ b/src/util/taler-exchange-secmod-rsa.c @@ -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, |