From 0d4cb53b23d5d5c773ba9578605181358076b0ce Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sat, 16 Mar 2019 22:01:10 +0800 Subject: [PATCH] undo RPC memleak fix, crashes iguana --- iguana/iguana_rpc.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/iguana/iguana_rpc.c b/iguana/iguana_rpc.c index ce3f000a4..719de3013 100755 --- a/iguana/iguana_rpc.c +++ b/iguana/iguana_rpc.c @@ -1117,28 +1117,15 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz jaddstr(arg,"userpass",userpass); retstr = SuperNET_JSON(myinfo,coin,arg,remoteaddr,port); } - if ( tokens != 0) - free_json(tokens); - if ( argjson != 0 ) - free_json(argjson); - if ( origargjson != 0 ) - free_json(origargjson); + free_json(argjson); + free_json(json); if ( tmpjson != 0 ) - free_json(tmpjson); - if ( json != 0 ) - free_json(json); + free(tmpjson); return(retstr); } - if ( tokens != 0) - free_json(tokens); - if ( argjson != 0 ) - free_json(argjson); - if ( origargjson != 0 ) - free_json(origargjson); + free_json(argjson); if ( tmpjson != 0 ) - free_json(tmpjson); - if ( json != 0 ) - free_json(json); + free(tmpjson); *jsonflagp = 1; return(clonestr("{\"error\":\"couldnt process packet\"}")); }