diff options
| author | Christian Grothoff <christian@grothoff.org> | 2022-02-09 09:18:35 +0100 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2022-02-09 09:18:35 +0100 | 
| commit | dfc5039d9a8ab7282147500c840c721094f45f4e (patch) | |
| tree | 7e1eda5c4574881dd57fd0e91d00bc9fd471c0ff /src | |
| parent | bd930549fbcc185ab9f675665b77496af95e00dd (diff) | |
-fix leak
Diffstat (limited to 'src')
| -rw-r--r-- | src/exchange-tools/taler-exchange-offline.c | 9 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_keys.c | 4 | 
2 files changed, 12 insertions, 1 deletions
diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c index 3b6280c7..3d85d376 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;  } diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c index 718facf5..3fa1007c 100644 --- a/src/exchange/taler-exchange-httpd_keys.c +++ b/src/exchange/taler-exchange-httpd_keys.c @@ -1916,6 +1916,10 @@ create_krd (struct TEH_KeyStateHandle *ksh,        r = json_object_update (keys, sig);        GNUNET_assert (0 == r);      } +    else +    { +      json_decref (extensions); +    }      // Special case for age restrictions: if enabled, provide the lits of      // age-restricted denominations.  | 
