提交 63a499d3 编写于 作者: J Jim Meyering

libvirtd: avoid a NULL dereference on error path

* daemon/libvirtd.c (qemudDispatchServer): Since "client" may be
NULL in the "cleanup:" block, free client->rx only when it's not.
上级 52a18abd
......@@ -1422,7 +1422,8 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
if (client &&
client->tlssession) gnutls_deinit (client->tlssession);
close (fd);
VIR_FREE(client->rx);
if (client)
VIR_FREE(client->rx);
VIR_FREE(client);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册