From: Jens Axboe Date: Mon, 28 Nov 2005 15:09:02 +0000 (+0100) Subject: [PATCH] fio: use temporary storage before calling dirname() X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=8cf48a05604d4770014219188f10ee700da4dd2d;p=disktools.git [PATCH] fio: use temporary storage before calling dirname() --- diff --git a/fio.c b/fio.c index 9a87f60..5d56f52 100644 --- a/fio.c +++ b/fio.c @@ -1662,7 +1662,8 @@ static void init_disk_util(struct thread_data *td) /* * must be a file, open "." in that path */ - p = dirname(td->file_name); + strcpy(foo, td->file_name); + p = dirname(foo); if (stat(p, &st)) { perror("disk util stat"); return;