From 411076fb96ca60b0491cb930e0e452c107d03630 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 2 Dec 2016 13:31:12 +1100 Subject: [PATCH] Fix minor memleak in submit_share --- src/generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 0643b473..630608eb 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1466,7 +1466,7 @@ static void submit_share(gdata_t *gdata, json_t *val) msg = ckzalloc(sizeof(stratum_msg_t)); msg->json_msg = val; share_id = add_share(gdata, client_id, proxi->diff); - json_object_set_nocheck(val, "id", json_integer(share_id)); + json_set_int(val, "id", share_id); /* Add the new message to the psend list */ mutex_lock(&gdata->psend_lock);