diff options
-rw-r--r-- | src/twister/taler-twister-service.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c index 4549a52..3dc7603 100644 --- a/src/twister/taler-twister-service.c +++ b/src/twister/taler-twister-service.c @@ -1634,6 +1634,7 @@ create_response (void *cls, hr->io_len, JSON_COMPACT); json_decref (hr->json); + hr->json = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Generating curl request\n"); @@ -1893,8 +1894,17 @@ create_response (void *cls, GNUNET_free (hr->io_buf); hr->io_buf = json_dumps (hr->json, JSON_COMPACT); - hr->io_len = strlen (hr->io_buf); + if (NULL != hr->io_buf) + { + hr->io_len = strlen (hr->io_buf); + } + else + { + GNUNET_break (0); + hr->io_len = 0; + } json_decref (hr->json); + hr->json = NULL; } if (GNUNET_YES == malform) @@ -2735,7 +2745,7 @@ handle_modify_path_ul (void *cls, */ static int check_modify_header_dl (void *cls, - const struct TWISTER_ModifyPath *src) + const struct TWISTER_ModifyPath *src) { return GNUNET_OK; } |