diff options
Diffstat (limited to 'extras/volume_id/lib')
-rw-r--r-- | extras/volume_id/lib/volume_id.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c index 791be43515..8f22509ca6 100644 --- a/extras/volume_id/lib/volume_id.c +++ b/extras/volume_id/lib/volume_id.c @@ -483,10 +483,9 @@ struct volume_id *volume_id_open_fd(int fd) { struct volume_id *id; - id = malloc(sizeof(struct volume_id)); + id = calloc(1, sizeof(struct volume_id)); if (id == NULL) return NULL; - memset(id, 0x00, sizeof(struct volume_id)); id->fd = fd; |