lsblk: fix filesystem array allocation

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-01-19 14:59:01 +01:00
parent c52d16098c
commit 8399fe089b
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ static void add_filesystem(struct lsblk_device *dev, struct libmnt_fs *fs)
assert(dev);
assert(fs);
dev->fss = xrealloc(dev->fss, dev->nfss + 1 * sizeof(struct libmnt_fs *));
dev->fss = xrealloc(dev->fss, (dev->nfss + 1)
* sizeof(struct libmnt_fs *));
dev->fss[dev->nfss] = fs;
dev->nfss++;
dev->is_mounted = 1;