mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
makefs: zero memory
NetBSD revs: ffs/buf.c 1.14 Obtained from: NetBSD
This commit is contained in:
parent
ec2408187e
commit
07e89ad740
1 changed files with 2 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "makefs.h"
|
||||
|
|
@ -219,6 +220,7 @@ getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused,
|
|||
n = realloc(bp->b_data, size);
|
||||
if (n == NULL)
|
||||
err(1, "getblk: realloc b_data %ld", bp->b_bcount);
|
||||
memset(n, 0, size);
|
||||
bp->b_data = n;
|
||||
bp->b_bufsize = size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue