projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85c705e
)
sg: add missing free(msg); in ->errdetails() handler
author
Tomohiro Kusumi
<tkusumi@tuxera.com>
Mon, 12 Jun 2017 20:02:06 +0000
(23:02 +0300)
committer
Jens Axboe
<axboe@fb.com>
Mon, 12 Jun 2017 20:51:01 +0000
(14:51 -0600)
msg gets malloc'd unconditionally, so we need to free msg if we're
not using msg for ret (strdup isn't really needed here to begin with).
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/sg.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/sg.c
b/engines/sg.c
index 2148e87c190f8c1dfc4f648aecb99796888ca777..9d339bd345554e671395e9c96fc13c66c0c14dab 100644
(file)
--- a/
engines/sg.c
+++ b/
engines/sg.c
@@
-759,8
+759,10
@@
static char *fio_sgio_errdetails(struct io_u *io_u)
}
}
- if (!ret)
+ if (!ret)
{
ret = strdup("SG Driver did not report a Host, Driver or Device check");
+ free(msg);
+ }
return ret;
}