Coverity CID 2319: Plug memory leak.

This commit is contained in:
christos 2006-04-12 00:59:56 +00:00
parent 03ee8a12f3
commit c904bed6a0
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_venus.c,v 1.22 2006/04/05 06:55:26 he Exp $ */
/* $NetBSD: coda_venus.c,v 1.23 2006/04/12 00:59:56 christos Exp $ */
/*
*
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.22 2006/04/05 06:55:26 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.23 2006/04/12 00:59:56 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -307,8 +307,10 @@ venus_ioctl(void *mdp, CodaFid *fid,
tmp = ((com >> 16) & IOCPARM_MASK) - sizeof (char *) - sizeof (int);
inp->cmd |= (tmp & IOCPARM_MASK) << 16;
if (iap->vi.in_size < 0 || iap->vi.in_size > VC_MAXMSGSIZE)
if (iap->vi.in_size < 0 || iap->vi.in_size > VC_MAXMSGSIZE) {
CODA_FREE(inp, coda_ioctl_size);
return (EINVAL);
}
inp->rwflag = flag;
inp->len = iap->vi.in_size;