]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix closedir usage in virNumaGetPages
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 21 Jun 2014 15:24:04 +0000 (19:24 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 23 Jun 2014 15:25:59 +0000 (19:25 +0400)
commit4a82ef92bec219ecdbf9c033db16a606caa5daab
treee6436254146bab1c92b4ccf8dd6a08855a1a951a
parent60c343f6885047e628cf10ed2590ff9f7d25b1de
Fix closedir usage in virNumaGetPages

virNumaGetPages calls closedir(dir) in cleanup and dir could
be NULL if we jump there from the failed opendir() call.

While it's not harmful on Linux, FreeBSD libc crashes [1], so
make sure that dir is not NULL before calling closedir.

1: http://lists.freebsd.org/pipermail/freebsd-standards/2014-January/002704.html
src/util/virnuma.c