Browse Source

undo RPC memleak fix, crashes iguana

blackjok3r
blackjok3r 6 years ago
parent
commit
0d4cb53b23
  1. 23
      iguana/iguana_rpc.c

23
iguana/iguana_rpc.c

@ -1117,28 +1117,15 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
jaddstr(arg,"userpass",userpass); jaddstr(arg,"userpass",userpass);
retstr = SuperNET_JSON(myinfo,coin,arg,remoteaddr,port); retstr = SuperNET_JSON(myinfo,coin,arg,remoteaddr,port);
} }
if ( tokens != 0) free_json(argjson);
free_json(tokens); free_json(json);
if ( argjson != 0 )
free_json(argjson);
if ( origargjson != 0 )
free_json(origargjson);
if ( tmpjson != 0 ) if ( tmpjson != 0 )
free_json(tmpjson); free(tmpjson);
if ( json != 0 )
free_json(json);
return(retstr); return(retstr);
} }
if ( tokens != 0) free_json(argjson);
free_json(tokens);
if ( argjson != 0 )
free_json(argjson);
if ( origargjson != 0 )
free_json(origargjson);
if ( tmpjson != 0 ) if ( tmpjson != 0 )
free_json(tmpjson); free(tmpjson);
if ( json != 0 )
free_json(json);
*jsonflagp = 1; *jsonflagp = 1;
return(clonestr("{\"error\":\"couldnt process packet\"}")); return(clonestr("{\"error\":\"couldnt process packet\"}"));
} }

Loading…
Cancel
Save