mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-23 21:37:42 -04:00
modules: remove redundant close
The close in the error path will never be called because the fd has been stolen and will be -1. Also make sure that when we free the source that we set it to NULL or else the destroy function will try to free it again.
This commit is contained in:
parent
250260e18e
commit
a6fe6196d5
1 changed files with 1 additions and 2 deletions
|
|
@ -550,8 +550,7 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
||||||
error:
|
error:
|
||||||
if (client->source)
|
if (client->source)
|
||||||
pw_loop_destroy_source(client->loop, client->source);
|
pw_loop_destroy_source(client->loop, client->source);
|
||||||
if (fd >= 0)
|
client->source = NULL;
|
||||||
close(fd);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue