projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cconv: convert ->log_offset on the wire
[fio.git]
/
memory.c
diff --git
a/memory.c
b/memory.c
index b208320c5d88cc619f7167626e3b7502ded07799..8c06d94d85e7a48ecfb5d8681a8780658f567f6c 100644
(file)
--- a/
memory.c
+++ b/
memory.c
@@
-158,9
+158,10
@@
static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
if (td->orig_buffer == MAP_FAILED) {
td_verror(td, errno, "mmap");
td->orig_buffer = NULL;
- if (td->mmapfd) {
+ if (td->mmapfd
!= 1
) {
close(td->mmapfd);
- unlink(td->o.mmapfile);
+ if (td->o.mmapfile)
+ unlink(td->o.mmapfile);
}
return 1;