diff options
author | helg <helg@cvs.openbsd.org> | 2018-05-17 11:25:12 +0000 |
---|---|---|
committer | helg <helg@cvs.openbsd.org> | 2018-05-17 11:25:12 +0000 |
commit | 64af9357fdb6962a63a9ec6842a01f81d8eb1c78 (patch) | |
tree | 069f78190f7e880da1d99a68df805d56e1f47613 | |
parent | dda9854fcef0057226ea3836beb7ad5732a8d92f (diff) |
Pass size argument to free(9).
ok mpi@
-rw-r--r-- | sys/miscfs/fuse/fuse_device.c | 8 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_vfsops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_vnops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/fuse/fusebuf.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index 51953bbacda..ca0b1af2e35 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.25 2018/05/15 11:57:32 helg Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.26 2018/05/17 11:25:11 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -158,7 +158,7 @@ fuse_destroy(dev_t dev, struct fuse_d *fd) { LIST_REMOVE(fd, fd_list); fuse_device_cleanup(dev, NULL); - free(fd, M_DEVBUF, sizeof *fd); + free(fd, M_DEVBUF, sizeof(*fd)); } /* @@ -351,7 +351,7 @@ fuseioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) #endif /* Adding fbuf in fd_fbufs_wait */ - free(fbuf->fb_dat, M_FUSEFS, 0); + free(fbuf->fb_dat, M_FUSEFS, fbuf->fb_len); fbuf->fb_dat = NULL; SIMPLEQ_INSERT_TAIL(&fd->fd_fbufs_wait, fbuf, fb_next); stat_fbufs_wait++; @@ -386,7 +386,7 @@ fuseioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) ioexch->fbxch_len); if (error) { printf("fuse: Cannot copyin\n"); - free(fbuf->fb_dat, M_FUSEFS, 0); + free(fbuf->fb_dat, M_FUSEFS, fbuf->fb_len); fbuf->fb_dat = NULL; return (error); } diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index 61396f580e2..6914a0b3099 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.35 2018/05/15 11:57:32 helg Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.36 2018/05/17 11:25:11 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -163,7 +163,7 @@ fusefs_unmount(struct mount *mp, int mntflags, struct proc *p) fuse_device_cleanup(fmp->dev, NULL); fuse_device_set_fmp(fmp, 0); - free(fmp, M_FUSEFS, 0); + free(fmp, M_FUSEFS, sizeof(*fmp)); mp->mnt_data = NULL; return (0); diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index f565cb0dd96..91fda224c6d 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.40 2018/05/16 13:09:17 helg Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.41 2018/05/17 11:25:11 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -861,7 +861,7 @@ fusefs_reclaim(void *v) */ ufs_ihashrem(&ip->ufs_ino); - free(ip, M_FUSEFS, 0); + free(ip, M_FUSEFS, sizeof(*ip)); vp->v_data = NULL; return (0); } diff --git a/sys/miscfs/fuse/fusebuf.c b/sys/miscfs/fuse/fusebuf.c index 44add882aff..c9f490c78b5 100644 --- a/sys/miscfs/fuse/fusebuf.c +++ b/sys/miscfs/fuse/fusebuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fusebuf.c,v 1.12 2016/08/30 16:45:54 natano Exp $ */ +/* $OpenBSD: fusebuf.c,v 1.13 2018/05/17 11:25:11 helg Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -67,7 +67,7 @@ void fb_delete(struct fusebuf *fbuf) { if (fbuf != NULL) { - free(fbuf->fb_dat, M_FUSEFS, 0); + free(fbuf->fb_dat, M_FUSEFS, fbuf->fb_len); pool_put(&fusefs_fbuf_pool, fbuf); } } |