mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
coverity 181575: check vhost iface non-null if using via bind_iface
This commit is contained in:
parent
6f11c1361a
commit
8a4881a142
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SO_BINDTODEVICE)
|
#if defined(SO_BINDTODEVICE)
|
||||||
if (vhost->bind_iface) {
|
if (vhost->bind_iface && vhost->iface) {
|
||||||
lwsl_info("binding listen skt to %s using SO_BINDTODEVICE\n", vhost->iface);
|
lwsl_info("binding listen skt to %s using SO_BINDTODEVICE\n", vhost->iface);
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost->iface,
|
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost->iface,
|
||||||
strlen(vhost->iface)) < 0) {
|
strlen(vhost->iface)) < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue