* [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path
@ 2019-01-03 13:26 Li Qiang
2019-01-03 13:38 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Li Qiang @ 2019-01-03 13:26 UTC (permalink / raw)
To: kraxel; +Cc: qemu-devel, peter.maydell, Li Qiang
Spotted by Coverity: CID 1397074
Signed-off-by: Li Qiang <liq3ea@163.com>
---
hw/usb/dev-mtp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 6098005cd4..b19b576278 100644
--- 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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path
2019-01-03 13:26 [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path Li Qiang
@ 2019-01-03 13:38 ` Philippe Mathieu-Daudé
2019-01-03 13:45 ` [Qemu-devel] 答复: " Li Qiang
2019-01-08 11:41 ` [Qemu-devel] " Gerd Hoffmann
0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-03 13:38 UTC (permalink / raw)
To: Li Qiang, kraxel; +Cc: peter.maydell, qemu-devel
On 1/3/19 2:26 PM, Li Qiang wrote:
> Spotted by Coverity: CID 1397074
>
Gerd, if you take this, can you add:
Fixes: c52d46e041b
> Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/usb/dev-mtp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
> index 6098005cd4..b19b576278 100644
> --- 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;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] 答复: [PATCH] usb: dev-mtp: fix memory leak in error path
2019-01-03 13:38 ` Philippe Mathieu-Daudé
@ 2019-01-03 13:45 ` Li Qiang
2019-01-08 11:41 ` [Qemu-devel] " Gerd Hoffmann
1 sibling, 0 replies; 4+ messages in thread
From: Li Qiang @ 2019-01-03 13:45 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, kraxel; +Cc: peter.maydell, qemu-devel
Oh, sorry, I always forget to add this “Fixs: xxx” for these small issues.
Thanks,
Li Qiang
发件人: Philippe Mathieu-Daudé
发送时间: 2019年1月3日 21:38
收件人: Li Qiang; kraxel@redhat.com
抄送: peter.maydell@linaro.org; qemu-devel@nongnu.org
主题: Re: [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path
On 1/3/19 2:26 PM, Li Qiang wrote:
> Spotted by Coverity: CID 1397074
>
Gerd, if you take this, can you add:
Fixes: c52d46e041b
> Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/usb/dev-mtp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
> index 6098005cd4..b19b576278 100644
> --- 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;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path
2019-01-03 13:38 ` Philippe Mathieu-Daudé
2019-01-03 13:45 ` [Qemu-devel] 答复: " Li Qiang
@ 2019-01-08 11:41 ` Gerd Hoffmann
1 sibling, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2019-01-08 11:41 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Li Qiang, peter.maydell, qemu-devel
On Thu, Jan 03, 2019 at 02:38:25PM +0100, Philippe Mathieu-Daudé wrote:
> On 1/3/19 2:26 PM, Li Qiang wrote:
> > Spotted by Coverity: CID 1397074
> >
>
> Gerd, if you take this, can you add:
>
> Fixes: c52d46e041b
Done. Thanks for looking up.
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-08 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03 13:26 [Qemu-devel] [PATCH] usb: dev-mtp: fix memory leak in error path Li Qiang
2019-01-03 13:38 ` Philippe Mathieu-Daudé
2019-01-03 13:45 ` [Qemu-devel] 答复: " Li Qiang
2019-01-08 11:41 ` [Qemu-devel] " Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.