diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-07-14 10:21:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-07-14 10:21:49 +0000 |
commit | 99c8413410235e3394024f3bd9f7e668d17a5350 (patch) | |
tree | a6f75aea4d9aedc3d2c238368560124bcaa95bcf | |
parent | 522cd221f63cbe8e30edf7429ec785aa536b45a2 (diff) |
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@
-rw-r--r-- | sys/kern/sys_generic.c | 4 |
1 files 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 |