|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/xenctx: Prevent leaking a file handle on error paths
commit 022d4ee27cee157949ab70c928cbf77d8cda0e3b
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Nov 25 11:05:48 2013 +0000
Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Nov 25 12:07:19 2013 +0000
tools/xenctx: Prevent leaking a file handle on error paths
Coverity ID: 1126110
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
tools/xentrace/xenctx.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 57e3277..ba502fd 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -208,13 +208,16 @@ static void read_symbol_table(const char *symtab)
continue;
default:
symbol = malloc(sizeof(*symbol));
- if (symbol == NULL)
+ if (symbol == NULL) {
+ fclose(f);
return;
+ }
symbol->address = address;
symbol->name = strdup(p);
if (symbol->name == NULL) {
free(symbol);
+ fclose(f);
return;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |