summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2019-10-11 15:25:40 +0000
committerjsg <jsg@openbsd.org>2019-10-11 15:25:40 +0000
commit1f85abb30ff81438ba36b13a6ffe65260455d5e8 (patch)
treeb17d7f5e2983aea196b068881ff4080564a19b90 /usr.sbin/vmd
parentProbe responses are generally only seen after probe requests, (diff)
downloadwireguard-openbsd-1f85abb30ff81438ba36b13a6ffe65260455d5e8.tar.xz
wireguard-openbsd-1f85abb30ff81438ba36b13a6ffe65260455d5e8.zip
use sizeof(struct) not sizeof(pointer) in calloc call
ok deraadt@
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r--usr.sbin/vmd/fw_cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/vmd/fw_cfg.c b/usr.sbin/vmd/fw_cfg.c
index a561e4a6a5f..385889fc700 100644
--- a/usr.sbin/vmd/fw_cfg.c
+++ b/usr.sbin/vmd/fw_cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fw_cfg.c,v 1.1 2018/12/10 21:30:33 claudio Exp $ */
+/* $OpenBSD: fw_cfg.c,v 1.2 2019/10/11 15:25:40 jsg Exp $ */
/*
* Copyright (c) 2018 Claudio Jeker <claudio@openbsd.org>
*
@@ -368,7 +368,7 @@ fw_cfg_add_file(const char *name, const void *data, size_t len)
if (fw_cfg_lookup_file(name))
fatalx("%s: fw_cfg: file %s exists", __progname, name);
- if ((f = calloc(sizeof(f), 1)) == NULL)
+ if ((f = calloc(sizeof(*f), 1)) == NULL)
fatal("%s", __func__);
if ((f->data = malloc(len)) == NULL)