projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2bd2bd
)
Missed update of dup_files() for dynamically allocated files
author
Jens Axboe
<jens.axboe@oracle.com>
Sat, 1 Mar 2008 17:22:27 +0000
(18:22 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Sat, 1 Mar 2008 17:22:27 +0000
(18:22 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 188b0ce88c476633b0a42931ef901dc9000b171c..b37de5b726b3203d27eed4c99281948d67a67ed3 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-719,13
+719,20
@@
void dup_files(struct thread_data *td, struct thread_data *org)
if (!org->files)
return;
- bytes = org->files_index * sizeof(
*
f);
+ bytes = org->files_index * sizeof(f);
td->files = malloc(bytes);
memcpy(td->files, org->files, bytes);
for_each_file(td, f, i) {
+ struct fio_file *__f;
+
+ __f = malloc(sizeof(*__f));
+ memset(f, 0, sizeof(*__f));
+
if (f->file_name)
- f->file_name = strdup(f->file_name);
+ __f->file_name = strdup(f->file_name);
+
+ td->files[i] = __f;
}
}