diff options
author | 2002-08-08 20:17:34 +0000 | |
---|---|---|
committer | 2002-08-08 20:17:34 +0000 | |
commit | 92284ec5ee607939579e0b22cec6de9b760647e5 (patch) | |
tree | 666bad3fdd5004b7c11291b43a6a519abc9aafcd | |
parent | redo socketbuf speedup. (diff) | |
download | wireguard-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.c | 6 |
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; |