Commit e83daabf authored by Alessandro Rubini's avatar Alessandro Rubini

lib: zero device on allocation

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 88a5697a
...@@ -173,7 +173,7 @@ static struct fmcadc_dev *fmcadc_zio_open(const struct fmcadc_board_type *dev, ...@@ -173,7 +173,7 @@ static struct fmcadc_dev *fmcadc_zio_open(const struct fmcadc_board_type *dev,
/* Path exists, so device is there */ /* Path exists, so device is there */
fa = malloc(sizeof *fa); fa = calloc(1, sizeof(*fa));
if (!fa) { if (!fa) {
goto out_fa_alloc; goto out_fa_alloc;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment