mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-08-02 05:12:55 +00:00
searpc-demo-server: free json object to fix leak
This commit is contained in:
parent
949917cb6c
commit
943e5a618b
@ -151,6 +151,7 @@ main(int argc, char *argv[])
|
||||
pac_ret = (packet *)buf;
|
||||
pac_ret->length = htons((uint16_t)ret_len);
|
||||
memcpy(pac_ret->data, res, ret_len);
|
||||
free(res);
|
||||
|
||||
/* send the ret packet */
|
||||
if (writen (connfd, buf, PACKET_HEADER_LENGTH + ret_len) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user