From: Micael Vinicius Lira Prado <[email protected]> The input buffer (c->inmsg) is allocated in handle_read() using erealloc(), but it is never released when the client is destroyed.
Free the input buffer before freeing the client structure to avoid leaking memory on every closed IPC connection. Signed-off-by: Micael Prado <[email protected]> Co-developed-by: João Marinho <[email protected]> Signed-off-by: João Marinho <[email protected]> --- lib/ipc/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ipc/server.c b/lib/ipc/server.c index 482b9197b..46d494051 100644 --- a/lib/ipc/server.c +++ b/lib/ipc/server.c @@ -693,6 +693,7 @@ maybe_close(struct client *c) dispatch_release(c->out); #endif close(c->fd); /* ref count fd close */ + free(c->inmsg); free(c); return 1; } -- 2.43.0

