From 4c73c37af14bbb8a0f002e06546436f3d96e4b2a Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 14 Jul 2018 10:21:48 +0000 Subject: [PATCH] Don't pass an uninitialised size value to free(9). Pointer argument is NULL in this path so free will return early without accessing it. ok jca@ tb@ --- sys/kern/sys_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 9af308c2324..0411e1c009e 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.120 2018/07/10 08:58:50 mpi Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.121 2018/07/14 10:21:48 jsg Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -392,7 +392,7 @@ sys_ioctl(struct proc *p, void *v, register_t *retval) struct filedesc *fdp = p->p_fd; u_long com = SCARG(uap, com); int error = 0; - u_int size; + u_int size = 0; caddr_t data, memp = NULL; int tmp; #define STK_PARAMS 128 -- 2.20.1