libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

commit b6269ce13493be6da9da415fe00d0ac7561874f3
parent d173ae9de29a239c7240ac145ca24654994728ca
Author: Kris Maglione <jg@suckless.org>
Date:   Fri,  1 Jun 2007 13:57:38 -0400

Free client message buffer on unmount.

Diffstat:
libixp/client.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/libixp/client.c b/libixp/client.c @@ -91,6 +91,7 @@ void ixp_unmount(IxpClient *c) { shutdown(c->fd, SHUT_RDWR); close(c->fd); + free(c->msg.data); free(c); } @@ -359,6 +360,8 @@ ixp_read(IxpCFid *f, void *buf, uint count) { fcall.count = n; if(dofcall(f->client, &fcall) == 0) return -1; + if(fcall.count > n) + return -1; memcpy(buf+len, fcall.data, fcall.count); f->offset += fcall.count;