diff options
Diffstat (limited to 'udev/lib/libudev.c')
-rw-r--r-- | udev/lib/libudev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/udev/lib/libudev.c b/udev/lib/libudev.c index a09aa051b3..fcb784580b 100644 --- a/udev/lib/libudev.c +++ b/udev/lib/libudev.c @@ -96,10 +96,9 @@ struct udev *udev_new(void) char *config_file; FILE *f; - udev = malloc(sizeof(struct udev)); + udev = calloc(1, sizeof(struct udev)); if (udev == NULL) return NULL; - memset(udev, 0x00, (sizeof(struct udev))); udev->refcount = 1; udev->log_fn = log_stderr; udev->log_priority = LOG_ERR; |