From 7200a570471907816431a57fe914ff5557118ee9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 17 Apr 2016 15:17:28 +0000 Subject: [PATCH] -use const and free json where it was allocated --- src/curl/curl.c | 1 + src/include/gnunet_curl_lib.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/curl/curl.c b/src/curl/curl.c index 10ba7f719..9276915b3 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c @@ -453,6 +453,7 @@ GNUNET_CURL_perform (struct GNUNET_CURL_Context *ctx) job->jcc (job->jcc_cls, response_code, j); + json_decref (j); GNUNET_CURL_job_cancel (job); } } diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 098b4dc37..db04f1233 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h @@ -113,7 +113,7 @@ struct GNUNET_CURL_Job; typedef void (*GNUNET_CURL_JobCompletionCallback)(void *cls, long response_code, - json_t *json); + const json_t *json); /** -- 2.25.1