diff options
author | jsg <jsg@openbsd.org> | 2019-10-11 15:25:40 +0000 |
---|---|---|
committer | jsg <jsg@openbsd.org> | 2019-10-11 15:25:40 +0000 |
commit | 1f85abb30ff81438ba36b13a6ffe65260455d5e8 (patch) | |
tree | b17d7f5e2983aea196b068881ff4080564a19b90 /usr.sbin/vmd | |
parent | Probe responses are generally only seen after probe requests, (diff) | |
download | wireguard-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.c | 4 |
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) |