diff options
author | Pavel Reichl <preichl@redhat.com> | 2023-12-14 22:10:25 +0100 |
---|---|---|
committer | Pavel Reichl <preichl@redhat.com> | 2023-12-14 22:10:25 +0100 |
commit | 9e66b0606cad74cb98dc44cb91903432171585a9 (patch) | |
tree | 44231314b5e1cb8929e9bf1f4161b8bcb74dcad4 | |
parent | 08a68c482a782006ff7e530a2b8fb7f019d460cd (diff) | |
download | fio-9e66b0606cad74cb98dc44cb91903432171585a9.tar.gz |
engines/http: Fix memory leak
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>
-rw-r--r-- | engines/http.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/http.c b/engines/http.c index 56dc7d1b1..83cfe8bb7 100644 --- 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; } |