Fix for realloc bug and wrong error logging
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 31 Jan 2012 09:51:50 +0000 (10:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 31 Jan 2012 09:51:50 +0000 (10:51 +0100)
commitd8365957edd930f13628ff473fd52501bd9c5dae
tree9a43facd29838e6053e5f4f8a6e9e4756a63178d
parent8e8bb835e375bd8cf0f01debff61f6bf467bb1ed
Fix for realloc bug and wrong error logging

This patch fixes two bugs in blktrace.

1. realloc is called on a wrong memory address (glibc reports heap
corruption if the user sends the output to a pipe, for example "blktrace
/dev/sdc -o -").

2. errno 0 is actually reported if debugfs is not mounted

Mikulas

Signed-off-by: Jens Axboe <axboe@kernel.dk>
blktrace.c