[libvirt] [PATCH] Fix closedir usage in virNumaGetPages

Ján Tomko jtomko at redhat.com
Mon Jun 23 06:57:11 UTC 2014


On 06/21/2014 05:29 PM, Roman Bogorodskiy wrote:
> 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 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

ACK

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140623/9a011897/attachment-0001.sig>


More information about the libvir-list mailing list