From: mbuhl Date: Wed, 22 Feb 2023 10:04:45 +0000 (+0000) Subject: Explicitly initialize vmd_vm pointer with NULL before calling vm_register. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=501909c0f6b0dc4b63ed8a3f67a6ff080522b2c5;p=openbsd Explicitly initialize vmd_vm pointer with NULL before calling vm_register. Found by codechecker. ok dv@ --- diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c index 9745615be3d..922e6cccd65 100644 --- a/usr.sbin/vmd/config.c +++ b/usr.sbin/vmd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.67 2023/01/28 14:40:53 dv Exp $ */ +/* $OpenBSD: config.c,v 1.68 2023/02/22 10:04:45 mbuhl Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -547,7 +547,7 @@ int config_getvm(struct privsep *ps, struct imsg *imsg) { struct vmop_create_params vmc; - struct vmd_vm *vm; + struct vmd_vm *vm = NULL; IMSG_SIZE_CHECK(imsg, &vmc); memcpy(&vmc, imsg->data, sizeof(vmc));