projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08a68c4
)
engines/http: Fix memory leak
author
Pavel Reichl
<preichl@redhat.com>
Thu, 14 Dec 2023 21:10:25 +0000
(22:10 +0100)
committer
Pavel Reichl
<preichl@redhat.com>
Thu, 14 Dec 2023 21:10:25 +0000
(22:10 +0100)
Found by Red Hat's OpenScanHub:
fio-3.35/engines/http.c:253: leaked_storage: Variable r going out of scope leaks the storage it points to.
Signed-off-by: Pavel Reichl <preichl@redhat.com>
engines/http.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/http.c
b/engines/http.c
index 56dc7d1b14f63d232d49693801109eb9dab5684c..83cfe8bb711fadbec2c9df2a5943978228668b16 100644
(file)
--- a/
engines/http.c
+++ b/
engines/http.c
@@
-250,6
+250,7
@@
static char *_aws_uriencode(const char *uri)
for (i = 0; (c = uri[i]); i++) {
if (n > bufsize-5) {
log_err("encoding the URL failed\n");
+ free(r);
return NULL;
}