aboutsummaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_history.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-09 14:51:47 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-09 14:51:47 +0100
commitaa44ae235b484e09dbb49dfdb961a3f576205ca0 (patch)
tree230accf06ccd303f19ca62e41af193603d2d9344 /src/lib/merchant_api_history.c
parentaf6293c5ef3272ad51567edb15901b7b6bfeab6b (diff)
close misc leaks, check for URL build errors
Diffstat (limited to 'src/lib/merchant_api_history.c')
-rw-r--r--src/lib/merchant_api_history.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/merchant_api_history.c b/src/lib/merchant_api_history.c
index 726204c3..c00cfa83 100644
--- a/src/lib/merchant_api_history.c
+++ b/src/lib/merchant_api_history.c
@@ -178,12 +178,18 @@ TALER_MERCHANT_history2 (struct GNUNET_CURL_Context *ctx,
CURL *eh;
char *base;
+ base = TALER_url_join (backend_url, "history", NULL);
+ if (NULL == base)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Could not construct request URL.\n");
+ return NULL;
+ }
ho = GNUNET_new (struct TALER_MERCHANT_HistoryOperation);
ho->ctx = ctx;
ho->cb = history_cb;
ho->cb_cls = history_cb_cls;
seconds = date.abs_value_us / 1000LL / 1000LL;
- base = TALER_url_join (backend_url, "history", NULL);
if (GNUNET_YES == use_default_start)
GNUNET_asprintf (&ho->url,
@@ -198,8 +204,6 @@ TALER_MERCHANT_history2 (struct GNUNET_CURL_Context *ctx,
seconds,
delta,
start);
-
-
GNUNET_free (base);
eh = curl_easy_init ();
if (CURLE_OK != curl_easy_setopt (eh,