virsh: do not access uninitialized memory in cmdDomFSInfo

Initialize 'info' to prevent accessing random access memory.

Introduced by commit 3072ded released in 4.8.0.

https://bugzilla.redhat.com/show_bug.cgi?id=1676354

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2019-02-12 07:51:19 +01:00
parent 44993d312d
commit eb3f5a2c6d

View File

@ -13938,7 +13938,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd)
virDomainPtr dom = NULL;
int rc = -1;
size_t i, j;
virDomainFSInfoPtr *info;
virDomainFSInfoPtr *info = NULL;
vshTablePtr table = NULL;
size_t ninfos = 0;