projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f308153
)
usb: dev-mtp: fix memory leak in error path
author
Li Qiang
<liq3ea@163.com>
Thu, 3 Jan 2019 13:26:05 +0000
(
05:26
-0800)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 8 Jan 2019 11:40:35 +0000
(12:40 +0100)
Spotted by Coverity: CID
1397074
Fixes: c52d46e041b
Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id:
20190103132605
.49476-1-liq3ea@163.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c
patch
|
blob
|
history
diff --git
a/hw/usb/dev-mtp.c
b/hw/usb/dev-mtp.c
index 6098005cd4bd820be5fa5cb9464027f6a6a058d6..b19b576278255e2fa36e7460f9ec31122f8dce9a 100644
(file)
--- a/
hw/usb/dev-mtp.c
+++ b/
hw/usb/dev-mtp.c
@@
-1729,6
+1729,7
@@
static void usb_mtp_write_metadata(MTPState *s, uint64_t dlen)
if (strchr(filename, '/')) {
usb_mtp_queue_result(s, RES_PARAMETER_NOT_SUPPORTED, d->trans,
0, 0, 0, 0);
+ g_free(filename);
return;
}