summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 007a14ebe9..05bb022d1b 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -34,10 +34,9 @@ struct udev_event *udev_event_new(struct udev_device *dev)
{
struct udev_event *event;
- event = malloc(sizeof(struct udev_event));
+ event = calloc(1, sizeof(struct udev_event));
if (event == NULL)
return NULL;
- memset(event, 0x00, sizeof(struct udev_event));
event->dev = dev;
event->udev = udev_device_get_udev(dev);