diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2023-01-12 20:13:29 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2023-01-12 20:13:29 +0000 |
commit | 32d7b2d91d51f168c40a91a15882550b46448016 (patch) | |
tree | e25ea49f97de7a53d6da307a5ad5ac26e5c7ce43 /sys | |
parent | 47c4f903d1fc4664b57dcbeb848611c7d24f315a (diff) |
free(NULL) has been allowed in the kernel since 5.4; remove checks.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/wscons/wsemul_vt100.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c index 9db1b3007a6..fe26d2ad2f1 100644 --- a/sys/dev/wscons/wsemul_vt100.c +++ b/sys/dev/wscons/wsemul_vt100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_vt100.c,v 1.40 2023/01/09 15:49:36 nicm Exp $ */ +/* $OpenBSD: wsemul_vt100.c,v 1.41 2023/01/12 20:13:28 miod Exp $ */ /* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */ /* @@ -236,14 +236,14 @@ wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp) *crowp = edp->crow; *ccolp = edp->ccol; -#define f(ptr) if (ptr) {free(ptr, M_DEVBUF, 0); ptr = NULL;} - f(edp->tabs) - f(edp->dblwid) - f(edp->dcsarg) - f(edp->isolatin1tab) - f(edp->decgraphtab) - f(edp->dectechtab) - f(edp->nrctab) +#define f(ptr) do { free(ptr, M_DEVBUF, 0); ptr = NULL; } while (0) + f(edp->tabs); + f(edp->dblwid); + f(edp->dcsarg); + f(edp->isolatin1tab); + f(edp->decgraphtab); + f(edp->dectechtab); + f(edp->nrctab); #undef f if (edp != &wsemul_vt100_console_emuldata) free(edp, M_DEVBUF, sizeof *edp); |