diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-09 14:51:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-09 14:51:47 +0100 |
commit | aa44ae235b484e09dbb49dfdb961a3f576205ca0 (patch) | |
tree | 230accf06ccd303f19ca62e41af193603d2d9344 /src/lib/merchant_api_tip_pickup.c | |
parent | af6293c5ef3272ad51567edb15901b7b6bfeab6b (diff) | |
download | merchant-aa44ae235b484e09dbb49dfdb961a3f576205ca0.tar.gz merchant-aa44ae235b484e09dbb49dfdb961a3f576205ca0.tar.bz2 merchant-aa44ae235b484e09dbb49dfdb961a3f576205ca0.zip |
close misc leaks, check for URL build errors
Diffstat (limited to 'src/lib/merchant_api_tip_pickup.c')
-rw-r--r-- | src/lib/merchant_api_tip_pickup.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index 12b08f4f..9473a8a4 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -290,16 +290,24 @@ TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, tpo->url = TALER_url_join (backend_url, "tip-pickup", NULL); + if (NULL == tpo->url) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Could not construct request URL.\n"); + json_decref (tp_obj); + GNUNET_free (tpo); + return NULL; + } eh = curl_easy_init (); if (GNUNET_OK != TALER_curl_easy_post (&tpo->post_ctx, eh, tp_obj)) { GNUNET_break (0); + json_decref (tp_obj); GNUNET_free (tpo); return NULL; } - json_decref (tp_obj); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |