提交 f9e94c2e 编写于 作者: J Jim Meyering

Avoid segfault upon early libvirtd failure.

* qemud/qemud.c (main): Don't call qemudCleanup on an
uninitialized pointer.
上级 6a17c6c6
Mon Mar 3 19:09:51 CET 2008 Jim Meyering <meyering@redhat.com>
Avoid segfault upon early libvirtd failure.
* qemud/qemud.c (main): Don't call qemudCleanup on an
uninitialized pointer.
Mon Mar 3 15:40:31 CET 2008 Daniel Veillard <veillard@redhat.com> Mon Mar 3 15:40:31 CET 2008 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in libvirt.spec.in docs/* include/libvirt/libvirt.h * NEWS configure.in libvirt.spec.in docs/* include/libvirt/libvirt.h
......
...@@ -2025,7 +2025,7 @@ libvirt management daemon:\n\ ...@@ -2025,7 +2025,7 @@ libvirt management daemon:\n\
#define MAX_LISTEN 5 #define MAX_LISTEN 5
int main(int argc, char **argv) { int main(int argc, char **argv) {
struct qemud_server *server; struct qemud_server *server = NULL;
struct sigaction sig_action; struct sigaction sig_action;
int sigpipe[2]; int sigpipe[2];
const char *pid_file = NULL; const char *pid_file = NULL;
...@@ -2180,7 +2180,8 @@ int main(int argc, char **argv) { ...@@ -2180,7 +2180,8 @@ int main(int argc, char **argv) {
unlink (pid_file); unlink (pid_file);
error1: error1:
qemudCleanup(server); if (server)
qemudCleanup(server);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册