summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2002-08-08 20:17:34 +0000
committeraaron <aaron@openbsd.org>2002-08-08 20:17:34 +0000
commit92284ec5ee607939579e0b22cec6de9b760647e5 (patch)
tree666bad3fdd5004b7c11291b43a6a519abc9aafcd
parentredo socketbuf speedup. (diff)
downloadwireguard-openbsd-92284ec5ee607939579e0b22cec6de9b760647e5.tar.xz
wireguard-openbsd-92284ec5ee607939579e0b22cec6de9b760647e5.zip
Fix structure allocation. The code incorrectly used sizeof(pointer) instead
of sizeof(*pointer). provos@ ok
-rw-r--r--sbin/photurisd/kernel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/photurisd/kernel.c b/sbin/photurisd/kernel.c
index f8f5f3c0cee..c8c5c8d3af0 100644
--- a/sbin/photurisd/kernel.c
+++ b/sbin/photurisd/kernel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernel.c,v 1.26 2002/06/10 19:58:20 espie Exp $ */
+/* $OpenBSD: kernel.c,v 1.27 2002/08/08 20:17:34 aaron Exp $ */
/*
* Copyright 1997-2000 Niels Provos <provos@citi.umich.edu>
@@ -41,7 +41,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: kernel.c,v 1.26 2002/06/10 19:58:20 espie Exp $";
+static char rcsid[] = "$OpenBSD: kernel.c,v 1.27 2002/08/08 20:17:34 aaron Exp $";
#endif
#include <time.h>
@@ -313,7 +313,7 @@ kernel_queue_msg(struct sadb_msg *smsg)
LOG_DBG((LOG_KERNEL, 50, "%s: queuing message type %d",
__func__, smsg->sadb_msg_type));
- pfmsg = malloc(sizeof(pfmsg));
+ pfmsg = malloc(sizeof(*pfmsg));
if (pfmsg == NULL) {
log_error("%s: malloc", __func__);
return;