forked from enlightenment/enlightenment
e sys l2ping - close socket fd on error to be clean
fix CID 1403954
This commit is contained in:
parent
bb390716f5
commit
ccd0da5f02
|
@ -45,6 +45,7 @@ e_sys_l2ping(const char *bluetooth_mac, int timeout_ms)
|
|||
if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
|
||||
{
|
||||
perror("Can't bind socket");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue