mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
festival: fix fd leak
Coverity 1139831
This commit is contained in:
parent
2b5d043654
commit
ff11934bbf
1 changed files with 2 additions and 0 deletions
|
@ -358,6 +358,7 @@ festival_socket_open (const char *host, int port)
|
|||
serverhost = gethostbyname (host);
|
||||
if (serverhost == (struct hostent *) 0) {
|
||||
fprintf (stderr, "festival_client: gethostbyname failed\n");
|
||||
close (fd);
|
||||
return -1;
|
||||
}
|
||||
memmove (&serv_addr.sin_addr, serverhost->h_addr, serverhost->h_length);
|
||||
|
@ -367,6 +368,7 @@ festival_socket_open (const char *host, int port)
|
|||
|
||||
if (connect (fd, (struct sockaddr *) &serv_addr, sizeof (serv_addr)) != 0) {
|
||||
fprintf (stderr, "festival_client: connect to server failed\n");
|
||||
close (fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue