diff options
author | 2012-12-06 08:13:04 +0000 | |
---|---|---|
committer | 2012-12-06 08:13:04 +0000 | |
commit | 6bd694d1cb0624ee190c30e2c60aa8fdefd7275e (patch) | |
tree | b04fa036309f29bcf8dacbe979b58cd5d914acf4 | |
parent | Fix some problems with the keys-command test: (diff) | |
download | wireguard-openbsd-6bd694d1cb0624ee190c30e2c60aa8fdefd7275e.tar.xz wireguard-openbsd-6bd694d1cb0624ee190c30e2c60aa8fdefd7275e.zip |
set port = NULL for new connctions, fixes crashes
found by brad
-rw-r--r-- | usr.bin/sndiod/sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c index 9e614f3515a..b909e08cea3 100644 --- a/usr.bin/sndiod/sock.c +++ b/usr.bin/sndiod/sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.4 2012/12/01 12:13:34 ratchov Exp $ */ +/* $OpenBSD: sock.c,v 1.5 2012/12/06 08:13:04 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -853,8 +853,8 @@ sock_hello(struct sock *f) return 0; } f->pstate = SOCK_INIT; + f->port = NULL; if (mode & MODE_MIDIMASK) { - f->port = NULL; f->slot = NULL; f->midi = midi_new(&sock_midiops, f, mode); if (f->midi == NULL) |