projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e2a62d
)
qemu-ga: Fix null pointer passed to unlink in failure branch
author
Stefan Weil
<sw@weilnetz.de>
Fri, 24 Aug 2012 05:03:03 +0000
(07:03 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 29 Aug 2012 13:25:55 +0000
(08:25 -0500)
Clang reports this warning:
Null pointer passed as an argument to a 'nonnull' parameter
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-ga.c
patch
|
blob
|
history
diff --git
a/qemu-ga.c
b/qemu-ga.c
index 26671fee3f61577505c63ddeec85ae502209d9c9..762307988783256aa0361c1ad71da1af8133d9e3 100644
(file)
--- a/
qemu-ga.c
+++ b/
qemu-ga.c
@@
-438,7
+438,9
@@
static void become_daemon(const char *pidfile)
return;
fail:
- unlink(pidfile);
+ if (pidfile) {
+ unlink(pidfile);
+ }
g_critical("failed to daemonize");
exit(EXIT_FAILURE);
#endif