diff options
author | 2015-06-21 21:22:27 +0000 | |
---|---|---|
committer | 2015-06-21 21:22:27 +0000 | |
commit | 670aa2b461fd6b8ef81a56c232e35b78f328d385 (patch) | |
tree | 41477875e81b1f98980de7683a8ce1637d5cf0a7 | |
parent | Don't leak mem if wsfont_rotate() fails. (diff) | |
download | wireguard-openbsd-670aa2b461fd6b8ef81a56c232e35b78f328d385.tar.xz wireguard-openbsd-670aa2b461fd6b8ef81a56c232e35b78f328d385.zip |
Don't use uninitialized data as a return value.
From Brainy via Maxime Villard via tech@.
ok kettenis@
-rw-r--r-- | sys/dev/ic/an.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index e3e1d6452d7..077cf7afab4 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.64 2015/02/10 23:25:46 mpi Exp $ */ +/* $OpenBSD: an.c,v 1.65 2015/06/21 21:22:27 krw Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1027,8 +1027,8 @@ an_init(struct ifnet *ifp) memcpy(sc->sc_buf.sc_ssidlist.an_entry[0].an_ssid, ic->ic_des_essid, ic->ic_des_esslen); an_swap16((u_int16_t *)&sc->sc_buf.sc_ssidlist.an_entry[0].an_ssid, 16); - if (an_write_rid(sc, AN_RID_SSIDLIST, &sc->sc_buf, - sizeof(sc->sc_buf.sc_ssidlist)) != 0) { + if ((error = an_write_rid(sc, AN_RID_SSIDLIST, &sc->sc_buf, + sizeof(sc->sc_buf.sc_ssidlist)))) { printf("%s: failed to write ssid list\n", ifp->if_xname); an_stop(ifp, 1); return error; @@ -1054,8 +1054,8 @@ an_init(struct ifnet *ifp) sc->sc_tx_key); /* Set the configuration */ - if (an_write_rid(sc, AN_RID_GENCONFIG, &sc->sc_config, - sizeof(sc->sc_config)) != 0) { + if ((error = an_write_rid(sc, AN_RID_GENCONFIG, &sc->sc_config, + sizeof(sc->sc_config)))) { printf("%s: failed to write config\n", ifp->if_xname); an_stop(ifp, 1); return error; |