From 6b5cf012725dcae5352a599a23a9e7818d7af29c Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 29 Jan 2015 14:49:17 +1100 Subject: [PATCH] Reuse free_smsg --- src/stratifier.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 477e57e8..ff8887ea 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -3467,13 +3467,6 @@ out: free(buf); } -static void discard_stratum_msg(smsg_t **msg) -{ - json_decref((*msg)->json_msg); - free(*msg); - *msg = NULL; -} - static void ssend_process(ckpool_t *ckp, smsg_t *msg) { char *s; @@ -3490,7 +3483,7 @@ static void ssend_process(ckpool_t *ckp, smsg_t *msg) s = json_dumps(msg->json_msg, 0); send_proc(ckp->connector, s); free(s); - discard_stratum_msg(&msg); + free_smsg(msg); } static void discard_json_params(json_params_t **jp)