]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cmdFreepages: initialize @tmp
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Jun 2014 18:25:22 +0000 (20:25 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Jun 2014 18:25:22 +0000 (20:25 +0200)
commit8d8e1d9dbc8aaf6cc7205835cdf2ee7ac549b8e7
tree2e81132015defdcf9fc932954646e9fb87573b3c
parent4a82ef92bec219ecdbf9c033db16a606caa5daab
cmdFreepages: initialize @tmp

In the 404bac14 the @tmp variable was introduced. It's purpose is to
avoid typecasting when parsing --pagesize argument. However, if the
argument is not presented, tmp may be used uninitialized resulting in
bogus virNodeGetFreePages() API call:

virsh freepages --cellno 2
error: Failed to open file '/sys/devices/system/node/node2/hugepages/hugepages-4294967295kB/free_hugepages': No such file or directory

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-host.c