From 501909c0f6b0dc4b63ed8a3f67a6ff080522b2c5 Mon Sep 17 00:00:00 2001 From: mbuhl Date: Wed, 22 Feb 2023 10:04:45 +0000 Subject: [PATCH] Explicitly initialize vmd_vm pointer with NULL before calling vm_register. Found by codechecker. ok dv@ --- usr.sbin/vmd/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); -- 2.20.1