diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-10-21 11:26:20 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-10-21 11:27:36 +0200 |
commit | ee5c860268845cc4fd2482bb351f4540b8592cd7 (patch) | |
tree | a4b94a19553790392c015aa91853056e66b723bf /src | |
parent | 366f0dbf81d7e5c080a5821e63992013a4c163f0 (diff) |
stream: Fix fd param passed to close() in error conditon
Fixes: CID#205089, CID#205087
Change-Id: I65714f214b9962862cda01605c7c2c578c78d3c7
Diffstat (limited to 'src')
-rw-r--r-- | src/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream.c b/src/stream.c index b7e5c3c..744a904 100644 --- a/src/stream.c +++ b/src/stream.c @@ -586,7 +586,7 @@ int osmo_stream_cli_open2(struct osmo_stream_cli *cli, int reconnect) return 0; error_close_socket: - close(ret); + close(cli->ofd.fd); cli->ofd.fd = -1; return -EIO; } @@ -654,7 +654,7 @@ int osmo_stream_cli_open(struct osmo_stream_cli *cli) return 0; error_close_socket: - close(ret); + close(cli->ofd.fd); cli->ofd.fd = -1; return -EIO; } |