diff options
| author | Stefan Weil | 2012-08-24 07:03:03 +0200 |
|---|---|---|
| committer | Anthony Liguori | 2012-08-29 15:25:55 +0200 |
| commit | 4bdb1a3059d7d3a931de0748a2eec39a0ab41b4e (patch) | |
| tree | 8fcf6f2700ba8967b652b27d3000216c449440ff | |
| parent | memory: Fix copy&paste mistake in memory_region_iorange_write (diff) | |
| download | qemu-4bdb1a3059d7d3a931de0748a2eec39a0ab41b4e.tar.gz qemu-4bdb1a3059d7d3a931de0748a2eec39a0ab41b4e.tar.xz qemu-4bdb1a3059d7d3a931de0748a2eec39a0ab41b4e.zip | |
qemu-ga: Fix null pointer passed to unlink in failure branch
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>
| -rw-r--r-- | qemu-ga.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |
