[Spice-devel] [PATCH vd_agent_linux 1/7] file-xfers: Initialise correctly AgentFileXferTask::file_fd field
Frediano Ziglio
fziglio at redhat.com
Tue Jan 15 18:49:56 UTC 2019
Correct invalid value for a file descriptor is -1, not 0.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
src/vdagent/file-xfers.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vdagent/file-xfers.c b/src/vdagent/file-xfers.c
index b5aedd0..78d5db3 100644
--- a/src/vdagent/file-xfers.c
+++ b/src/vdagent/file-xfers.c
@@ -133,6 +133,7 @@ static AgentFileXferTask *vdagent_parse_start_msg(
goto error;
}
task = g_new0(AgentFileXferTask, 1);
+ task->file_fd = -1;
task->id = msg->id;
task->file_name = g_key_file_get_string(
keyfile, "vdagent-file-xfer", "name", &error);
--
2.20.1
More information about the Spice-devel
mailing list