diff options
Diffstat (limited to 'udev/lib/libudev-enumerate.c')
-rw-r--r-- | udev/lib/libudev-enumerate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/udev/lib/libudev-enumerate.c b/udev/lib/libudev-enumerate.c index b35a82d0ce..e5a4ccee3b 100644 --- a/udev/lib/libudev-enumerate.c +++ b/udev/lib/libudev-enumerate.c @@ -53,10 +53,9 @@ struct udev_enumerate *udev_enumerate_new(struct udev *udev) { struct udev_enumerate *udev_enumerate; - udev_enumerate = malloc(sizeof(struct udev_enumerate)); + udev_enumerate = calloc(1, sizeof(struct udev_enumerate)); if (udev_enumerate == NULL) return NULL; - memset(udev_enumerate, 0x00, (sizeof(struct udev_enumerate))); udev_enumerate->refcount = 1; udev_enumerate->udev = udev; udev_list_init(&udev_enumerate->devices_list); |