diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/auditor/taler-auditor-httpd.c | 15 | ||||
| -rw-r--r-- | src/bank-lib/bank_api_parse.c | 5 | ||||
| -rw-r--r-- | src/exchange-lib/testing_api_cmd_batch.c | 1 | ||||
| -rw-r--r-- | src/exchange-lib/testing_api_cmd_refresh.c | 3 | ||||
| -rw-r--r-- | src/wire-plugins/plugin_wire_taler-bank.c | 6 | 
5 files changed, 23 insertions, 7 deletions
| diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c index 5e1d1b16..c7c2589c 100644 --- a/src/auditor/taler-auditor-httpd.c +++ b/src/auditor/taler-auditor-httpd.c @@ -314,16 +314,19 @@ handle_version (struct TAH_RequestHandler *rh,                  const char *upload_data,                  size_t *upload_data_size)  { -  json_t *ver; +  static json_t *ver; /* we build the response only once, keep around for next query! */    (void) rh;    (void) upload_data;    (void) upload_data_size;    (void) connection_cls; -  ver = json_pack ("{s:s, s:s, s:o}", -                   "version", AUDITOR_PROTOCOL_VERSION, -                   "currency", currency, -                   "auditor_public_key", GNUNET_JSON_from_data_auto (&auditor_pub)); +  if (NULL == ver) +  { +    ver = json_pack ("{s:s, s:s, s:o}", +                     "version", AUDITOR_PROTOCOL_VERSION, +                     "currency", currency, +                     "auditor_public_key", GNUNET_JSON_from_data_auto (&auditor_pub)); +  }    if (NULL == ver)    {      GNUNET_break (0); @@ -616,8 +619,10 @@ auditor_serve_process_config ()        GNUNET_free (auditor_key_file);        return 1;      } +    GNUNET_free (auditor_key_file);      GNUNET_CRYPTO_eddsa_key_get_public (eddsa_priv,                                          &auditor_pub.eddsa_pub); +    GNUNET_free (eddsa_priv);    }    else    { diff --git a/src/bank-lib/bank_api_parse.c b/src/bank-lib/bank_api_parse.c index 04cf7b85..6de9e5e1 100644 --- a/src/bank-lib/bank_api_parse.c +++ b/src/bank-lib/bank_api_parse.c @@ -66,6 +66,7 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,        {        case TALER_BANK_AUTH_NONE:          auth->method = TALER_BANK_AUTH_NONE; +        GNUNET_free (method);          return GNUNET_OK;        case TALER_BANK_AUTH_BASIC:          if (GNUNET_OK != @@ -77,6 +78,7 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,            GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,                                       section,                                       "USERNAME"); +          GNUNET_free (method);            return GNUNET_SYSERR;          }          if (GNUNET_OK != @@ -90,13 +92,16 @@ TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,            GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,                                       section,                                       "USERNAME"); +          GNUNET_free (method);            return GNUNET_SYSERR;          }          auth->method = TALER_BANK_AUTH_BASIC; +        GNUNET_free (method);          return GNUNET_OK;        }      }    } +  GNUNET_free (method);    return GNUNET_SYSERR;  } diff --git a/src/exchange-lib/testing_api_cmd_batch.c b/src/exchange-lib/testing_api_cmd_batch.c index 5269d0b8..15b0413d 100644 --- a/src/exchange-lib/testing_api_cmd_batch.c +++ b/src/exchange-lib/testing_api_cmd_batch.c @@ -97,6 +97,7 @@ batch_cleanup (void *cls,      bs->batch[i].cleanup (bs->batch[i].cls,                            &bs->batch[i]);    GNUNET_free_non_null (bs->batch); +  GNUNET_free (bs);  } diff --git a/src/exchange-lib/testing_api_cmd_refresh.c b/src/exchange-lib/testing_api_cmd_refresh.c index 50ea4678..85c1f8c9 100644 --- a/src/exchange-lib/testing_api_cmd_refresh.c +++ b/src/exchange-lib/testing_api_cmd_refresh.c @@ -465,6 +465,7 @@ refresh_reveal_cleanup (void *cls,    GNUNET_free_non_null (rrs->fresh_coins);    rrs->fresh_coins = NULL;    rrs->num_fresh_coins = 0; +  GNUNET_free (rrs);  } @@ -765,6 +766,7 @@ refresh_link_cleanup (void *cls,      GNUNET_SCHEDULER_cancel (rls->retry_task);      rls->retry_task = NULL;    } +  GNUNET_free (rls);  } @@ -1036,6 +1038,7 @@ refresh_melt_cleanup (void *cls,    GNUNET_free_non_null (rms->refresh_data);    rms->refresh_data = NULL;    rms->refresh_data_length = 0; +  GNUNET_free (rms);  } diff --git a/src/wire-plugins/plugin_wire_taler-bank.c b/src/wire-plugins/plugin_wire_taler-bank.c index 029380fb..6075b25a 100644 --- a/src/wire-plugins/plugin_wire_taler-bank.c +++ b/src/wire-plugins/plugin_wire_taler-bank.c @@ -280,7 +280,7 @@ parse_payto (const char *account_url,                         "%llu",                         &port))        { -        GNUNET_break (0);  +        GNUNET_break (0);          TALER_LOG_ERROR ("Malformed host from payto:// URI\n");          GNUNET_free (r_account->hostname);          return TALER_EC_PAYTO_MALFORMED; @@ -300,7 +300,7 @@ parse_payto (const char *account_url,          (GNUNET_SYSERR != GNUNET_asprintf            (&r_account->bank_base_url,             "https://%s", -           r_account->hostname));   +           r_account->hostname));      }    }    return TALER_EC_NONE; @@ -578,6 +578,7 @@ taler_bank_prepare_wire_transfer (void *cls,      GNUNET_free (a_in.bank_base_url);      GNUNET_free (a_out.hostname);      GNUNET_free (a_out.bank_base_url); +    GNUNET_free (origin_account_url);      return NULL;    }    GNUNET_free (a_in.hostname); @@ -592,6 +593,7 @@ taler_bank_prepare_wire_transfer (void *cls,                                   &pth->auth))    {      GNUNET_free (pth); +    GNUNET_free (origin_account_url);      return NULL;    } | 
