]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virpcimock: Initialize real_close before using it
authorRoman Bolshakov <r.bolshakov@yadro.com>
Tue, 3 Nov 2020 14:26:28 +0000 (17:26 +0300)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 4 Nov 2020 10:53:57 +0000 (11:53 +0100)
commit31eb96358fdfec5ea0ee807fc1583746b1ca9a0d
treec28faa7d306a160d74f8219cceb031034d96ab66
parent457877eae48d5cf3dc1ff687a8cc69def557a570
virpcimock: Initialize real_close before using it

real_close() is not inialized by the first invocation of close(). That
causes an issue when the mock is used before others and a call of
real_close() results in a jump to NULL pointer.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
tests/virpcimock.c