summaryrefslogtreecommitdiff
path: root/sys/compat/common/if_media_80.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/common/if_media_80.c')
-rw-r--r--sys/compat/common/if_media_80.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/common/if_media_80.c b/sys/compat/common/if_media_80.c
index 829beac1f00..a35fdb33f7f 100644
--- a/sys/compat/common/if_media_80.c
+++ b/sys/compat/common/if_media_80.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_media_80.c,v 1.1 2019/05/17 07:37:11 msaitoh Exp $ */
+/* $NetBSD: if_media_80.c,v 1.1.4.1 2022/08/03 11:11:31 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -141,7 +141,8 @@ compat_ifmediareq_post(struct ifreq *ifr, u_long cmd)
* there is no problem to trust ifm_count.
*/
minwords = ifmr->ifm_count;
- kptr = malloc(minwords * sizeof(*kptr), M_TEMP, M_WAITOK);
+ kptr = malloc(minwords * sizeof(*kptr), M_TEMP,
+ M_WAITOK|M_ZERO);
if (kptr == NULL)
return ENOMEM;