KCM: Memory leak in handle_read

The `inmsg` field of the client structure is malloc/realloc'ed in `handle_read` but never free'ed in `maybe_close`.
Seems like Apple already fixed that with this.
This commit is contained in:
Romain F
2022-03-21 17:01:01 +01:00
committed by Nico Williams
parent 1dbfd4e835
commit 5dd29ecd2c

View File

@@ -700,6 +700,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;
}