libosmo-netif/src
Harald Welte a4c1a73250 stream: don't crash in _close() when fd is not initialized
We use the magic value '-1' in case the file descriptor is not yet
initialized.  If somebody calls osmo_stream_*_close() before this
changes, we used to crash.  Let's check for this and avoid a crash.

Also, after close let's change the fd to -1 again to mark the fd
invalidity.

Change-Id: I3aa04999ab01cb7971ee2dad45dfc31ab4142868
2017-03-17 12:06:24 +01:00
..
channel Fix the compilation on FreeBSD. 2015-02-25 15:52:14 +01:00
Makefile.am SCTP support for osmo_stream_{cli,srv} code 2015-12-21 20:54:19 +01:00
amr.c amr: use AMR_FT_MAX instead of hardcoded number 2013-12-14 22:41:03 +01:00
channel.c channel: add subtype ID to osmo_chan_create 2012-08-19 00:52:00 +02:00
datagram.c Fix the compilation on FreeBSD. 2015-02-25 15:52:14 +01:00
ipa.c ipa: fix compilation warning 2012-10-15 23:09:36 +02:00
ipa_unit.c ipa_unit: use talloc_strdup 2013-08-25 14:24:46 +02:00
osmux.c Fix potential NULL dereference 2017-02-07 11:46:41 +01:00
rs232.c rs232.c: Fix license to GPLv2-or-later. libosmo-netif is GPLv2-or-later 2016-12-22 14:19:32 +00:00
rtp.c endian: Use the new endian macros for portability 2015-03-22 09:38:36 +01:00
stream.c stream: don't crash in _close() when fd is not initialized 2017-03-17 12:06:24 +01:00