projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb863d7
)
[PATCH] Fix double free in error path
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 2 Jan 2007 08:20:49 +0000
(09:20 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 2 Jan 2007 08:20:49 +0000
(09:20 +0100)
Reported by zhuxudong <zhuxudong@nrchpc.ac.cn>
If we fail reading, we will free the realloc'ed pointer and jump to
the error path which will free the original pointer. Fix this by clearing
the original pointer.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blkparse.c
patch
|
blob
|
blame
|
history
diff --git
a/blkparse.c
b/blkparse.c
index 6bb53080cedb1ec53b477507c1352c6fc6c29e1b..90614d81cf9efbd504daae660daea1ce6d734cdf 100644
(file)
--- a/
blkparse.c
+++ b/
blkparse.c
@@
-2167,6
+2167,7
@@
static int ms_prime(struct ms_stream *msp)
1, &pci->fdblock);
if (ret) {
free(ptr);
+ bit = NULL;
goto err;
}