mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
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>
This commit is contained in:
parent
457877eae4
commit
31eb96358f
@ -1123,6 +1123,8 @@ opendir(const char *path)
|
||||
int
|
||||
close(int fd)
|
||||
{
|
||||
init_syms();
|
||||
|
||||
if (remove_fd(fd) < 0)
|
||||
return -1;
|
||||
return real_close(fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user