diff options
author | Edward Hervey <edward@collabora.com> | 2014-04-16 15:32:32 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2014-04-16 15:32:32 +0200 |
commit | 1a42aaad4730a7039660c1af0b30868f40e729f1 (patch) | |
tree | 9960bfa74da6928b96d8df2eaf9a593f334aff37 /sys | |
parent | 012b5b8d4a28144d05b3d6ee542ecba2423e2308 (diff) |
dvb: Handle socket() failure
CID #206178
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dvb/camswclient.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dvb/camswclient.c b/sys/dvb/camswclient.c index 628218e0f..b5750d5a9 100644 --- a/sys/dvb/camswclient.c +++ b/sys/dvb/camswclient.c @@ -83,7 +83,10 @@ cam_sw_client_open (CamSwClient * client, const char *sock_path) strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path)); GST_INFO ("connecting to softcam socket: %s", sock_path); - client->sock = socket (PF_UNIX, SOCK_STREAM, 0); + if (client->sock = socket (PF_UNIX, SOCK_STREAM, 0)) { + GST_ERROR ("Failed to create a socket, error : %s", strerror (errno)); + return FALSE; + } ret = connect (client->sock, (struct sockaddr *) &addr, sizeof (struct sockaddr_un)); |