projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08eb8c8
)
libqtest: only call fclose() on open files
author
Jesse Larrew
<jlarrew@linux.vnet.ibm.com>
Mon, 29 Apr 2013 15:52:52 +0000
(10:52 -0500)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Tue, 30 Apr 2013 21:04:14 +0000
(16:04 -0500)
libqtest.c can segfault when calling fclose() if the pidfile wasn't
opened successfully. This patch fixes the issue.
Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1367250772
-17928-1-git-send-email-jlarrew@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests/libqtest.c
patch
|
blob
|
history
diff --git
a/tests/libqtest.c
b/tests/libqtest.c
index 884f959992e359573282e35e2e77d8efd0aa400b..879ffe91dc26e688c353a446cf87b06c4ba80a23 100644
(file)
--- a/
tests/libqtest.c
+++ b/
tests/libqtest.c
@@
-99,8
+99,8
@@
static pid_t qtest_qemu_pid(QTestState *s)
if (fgets(buffer, sizeof(buffer), f)) {
pid = atoi(buffer);
}
+ fclose(f);
}
- fclose(f);
return pid;
}