-use const and free json where it was allocated
authorChristian Grothoff <christian@grothoff.org>
Sun, 17 Apr 2016 15:17:28 +0000 (15:17 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 17 Apr 2016 15:17:28 +0000 (15:17 +0000)
src/curl/curl.c
src/include/gnunet_curl_lib.h

index 10ba7f719ce330a9d0884a539d5e2eebf079be36..9276915b324455c1a39d2ec3bcf736775bdb3274 100644 (file)
@@ -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);
   }
 }
index 098b4dc37bd193aa787cbfccbb052057d89e13d8..db04f12331b815819d44511452b584d51114e0d5 100644 (file)
@@ -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);
 
 
 /**