summaryrefslogtreecommitdiff
path: root/libudev/libudev-monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'libudev/libudev-monitor.c')
-rw-r--r--libudev/libudev-monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c
index a3789c4d13..c97f6faa65 100644
--- a/libudev/libudev-monitor.c
+++ b/libudev/libudev-monitor.c
@@ -342,6 +342,7 @@ int udev_monitor_filter_update(struct udev_monitor *udev_monitor)
bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff);
/* install filter */
+ memset(&filter, 0x00, sizeof(filter));
filter.len = i;
filter.filter = ins;
err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter));