All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH v2] spice: fix memory leak
@ 2015-02-11 16:50 ` Gerd Hoffmann
  0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2015-02-11 16:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, Gerd Hoffmann, Luiz Capitulino

Found by coverity.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/monitor.c b/monitor.c
index c3cc060..2c37953 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
     if (strcmp(protocol, "spice") == 0) {
         if (!qemu_using_spice(&err)) {
             qerror_report_err(err);
+            error_free(err);
             return -1;
         }
 
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v2] spice: fix memory leak
@ 2015-02-11 16:50 ` Gerd Hoffmann
  0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2015-02-11 16:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, Gerd Hoffmann, Luiz Capitulino

Found by coverity.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/monitor.c b/monitor.c
index c3cc060..2c37953 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
     if (strcmp(protocol, "spice") == 0) {
         if (!qemu_using_spice(&err)) {
             qerror_report_err(err);
+            error_free(err);
             return -1;
         }
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] spice: fix memory leak
  2015-02-11 16:50 ` [Qemu-devel] " Gerd Hoffmann
@ 2015-02-12  2:14   ` Gonglei
  -1 siblings, 0 replies; 4+ messages in thread
From: Gonglei @ 2015-02-12  2:14 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel; +Cc: qemu-trivial, pbonzini, Luiz Capitulino

On 2015/2/12 0:50, Gerd Hoffmann wrote:
> Found by coverity.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  monitor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/monitor.c b/monitor.c
> index c3cc060..2c37953 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
>      if (strcmp(protocol, "spice") == 0) {
>          if (!qemu_using_spice(&err)) {
>              qerror_report_err(err);
> +            error_free(err);
>              return -1;
>          }
>  
> 
Hi, Gerd
the err variable should be initialized to NULL.

This leak had been fixed by:
http://patchwork.ozlabs.org/patch/438696/

and v2:
[PATCH v2] monitor: Fix missing err = NULL in client_migrate_info()

Regards,
-Gonglei



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] spice: fix memory leak
@ 2015-02-12  2:14   ` Gonglei
  0 siblings, 0 replies; 4+ messages in thread
From: Gonglei @ 2015-02-12  2:14 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel; +Cc: qemu-trivial, pbonzini, Luiz Capitulino

On 2015/2/12 0:50, Gerd Hoffmann wrote:
> Found by coverity.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  monitor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/monitor.c b/monitor.c
> index c3cc060..2c37953 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
>      if (strcmp(protocol, "spice") == 0) {
>          if (!qemu_using_spice(&err)) {
>              qerror_report_err(err);
> +            error_free(err);
>              return -1;
>          }
>  
> 
Hi, Gerd
the err variable should be initialized to NULL.

This leak had been fixed by:
http://patchwork.ozlabs.org/patch/438696/

and v2:
[PATCH v2] monitor: Fix missing err = NULL in client_migrate_info()

Regards,
-Gonglei

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-12  2:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 16:50 [Qemu-trivial] [PATCH v2] spice: fix memory leak Gerd Hoffmann
2015-02-11 16:50 ` [Qemu-devel] " Gerd Hoffmann
2015-02-12  2:14 ` [Qemu-trivial] " Gonglei
2015-02-12  2:14   ` Gonglei

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.