Left a dangling pointer (#240)

* Clean up and return 0 on recv, let task reconnect

* Set json buffer to null

---------

Co-authored-by: tommy <tommy@tommywatson.com>
Co-authored-by: Skot <skot@bitnet.cx>
This commit is contained in:
tommywatson
2024-06-21 07:26:19 -05:00
committed by GitHub
parent 08b7ad5409
commit 19aa080202

View File

@ -86,6 +86,7 @@ char * STRATUM_V1_receive_jsonrpc_line(int sockfd)
ESP_LOGI(TAG, "Error: recv");
if (json_rpc_buffer) {
free(json_rpc_buffer);
json_rpc_buffer=0;
}
return 0;
}