diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-11-02 15:39:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-11-02 15:39:03 +0000 |
commit | c4a5135d55beb4e5f73d0ad313604b365d979984 (patch) | |
tree | d79656e84e4c2b1951c41457d0862e8d183b26a3 /sys | |
parent | c8b1bfe01bf1ae444c07fa29935ee548668f0452 (diff) |
Don't call memset() if MALLOC returns NULL; also fix the rcs ID.
From Patrick Latifi; OK reyk@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index f143467a576..a73373f2b5b 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD $ */ +/* $OpenBSD: ieee80211_node.c,v 1.2 2004/11/02 15:39:02 millert Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -479,7 +479,8 @@ ieee80211_node_alloc(struct ieee80211com *ic) struct ieee80211_node *ni; MALLOC(ni, struct ieee80211_node *, sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT); - memset(ni, 0, sizeof(struct ieee80211_node)); + if (ni != NULL) + memset(ni, 0, sizeof(struct ieee80211_node)); return ni; } |