mirror of https://gitee.com/openkylin/libvirt.git
tests: avoid close of bad file handle in commandtest
Closed file handles need to be initialized to -1, not 0. This caused a inappropriate double close of stdin, which is not desirable, although it had no ill effects. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
946c815024
commit
faf76dd70e
|
@ -1091,8 +1091,8 @@ static int test27(const void *unused G_GNUC_UNUSED)
|
|||
printf("Could not set send buffers\n");
|
||||
goto cleanup;
|
||||
}
|
||||
pipe1[1] = 0;
|
||||
pipe2[1] = 0;
|
||||
pipe1[1] = -1;
|
||||
pipe2[1] = -1;
|
||||
buffer1 = NULL;
|
||||
buffer2 = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue