qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] fix coverity complaint
@ 2016-05-12  9:57 Gonglei
  2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 1/2] egl-helpers: fix possible resource leak Gonglei
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gonglei @ 2016-05-12  9:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel, Gonglei

Rebase on the latest master brunch.

Gonglei (2):
  egl-helpers: fix possible resource leak
  spice: fix coverity complains

 ui/egl-helpers.c   | 9 +++------
 ui/spice-display.c | 4 +---
 2 files changed, 4 insertions(+), 9 deletions(-)

-- 
1.7.12.4

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

* [Qemu-devel] [PATCH v2 1/2] egl-helpers: fix possible resource leak
  2016-05-12  9:57 [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gonglei
@ 2016-05-12  9:57 ` Gonglei
  2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 2/2] spice: fix coverity complains Gonglei
  2016-05-12 13:38 ` [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gerd Hoffmann
  2 siblings, 0 replies; 5+ messages in thread
From: Gonglei @ 2016-05-12  9:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel, Gonglei

CID 1352419, using g_strdup_printf instead of asprintf.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 ui/egl-helpers.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index 558edfd..22835c0 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -49,18 +49,15 @@ int qemu_egl_rendernode_open(void)
             continue;
         }
 
-        r = asprintf(&p, "/dev/dri/%s", e->d_name);
-        if (r < 0) {
-            return -1;
-        }
+        p = g_strdup_printf("/dev/dri/%s", e->d_name);
 
         r = open(p, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
         if (r < 0) {
-            free(p);
+            g_free(p);
             continue;
         }
         fd = r;
-        free(p);
+        g_free(p);
         break;
     }
 
-- 
1.7.12.4

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

* [Qemu-devel] [PATCH v2 2/2] spice: fix coverity complains
  2016-05-12  9:57 [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gonglei
  2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 1/2] egl-helpers: fix possible resource leak Gonglei
@ 2016-05-12  9:57 ` Gonglei
  2016-05-12 13:38 ` [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gerd Hoffmann
  2 siblings, 0 replies; 5+ messages in thread
From: Gonglei @ 2016-05-12  9:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel, Gonglei

Remove the unnecessary NULL check.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 ui/spice-display.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ui/spice-display.c b/ui/spice-display.c
index 242ab5f..1ffbec1 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -769,9 +769,7 @@ static void display_mouse_define(DisplayChangeListener *dcl,
     SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
 
     qemu_mutex_lock(&ssd->lock);
-    if (c) {
-        cursor_get(c);
-    }
+    cursor_get(c);
     cursor_put(ssd->cursor);
     ssd->cursor = c;
     ssd->hot_x = c->hot_x;
-- 
1.7.12.4

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

* Re: [Qemu-devel] [PATCH v2 0/2] fix coverity complaint
  2016-05-12  9:57 [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gonglei
  2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 1/2] egl-helpers: fix possible resource leak Gonglei
  2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 2/2] spice: fix coverity complains Gonglei
@ 2016-05-12 13:38 ` Gerd Hoffmann
  2016-05-13  0:22   ` Gonglei (Arei)
  2 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2016-05-12 13:38 UTC (permalink / raw)
  To: Gonglei; +Cc: qemu-devel

On Do, 2016-05-12 at 17:57 +0800, Gonglei wrote:
> Rebase on the latest master brunch.
                              ^^^^^^
Haha.  Intentional or tyops?

Added to ui queue now.

thanks,
  Gerd

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

* Re: [Qemu-devel] [PATCH v2 0/2] fix coverity complaint
  2016-05-12 13:38 ` [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gerd Hoffmann
@ 2016-05-13  0:22   ` Gonglei (Arei)
  0 siblings, 0 replies; 5+ messages in thread
From: Gonglei (Arei) @ 2016-05-13  0:22 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel@nongnu.org

> From: Gerd Hoffmann [mailto:kraxel@redhat.com]
> Sent: Thursday, May 12, 2016 9:38 PM
> To: Gonglei (Arei)
> Cc: qemu-devel@nongnu.org
> Subject: Re: [PATCH v2 0/2] fix coverity complaint
> 
> On Do, 2016-05-12 at 17:57 +0800, Gonglei wrote:
> > Rebase on the latest master brunch.
>                               ^^^^^^
> Haha.  Intentional or tyops?
> 
Oh, sorry, it's a typo ;)

> Added to ui queue now.
> 
> thanks,
>   Gerd

Regards,
-Gonglei

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

end of thread, other threads:[~2016-05-13  0:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12  9:57 [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gonglei
2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 1/2] egl-helpers: fix possible resource leak Gonglei
2016-05-12  9:57 ` [Qemu-devel] [PATCH v2 2/2] spice: fix coverity complains Gonglei
2016-05-12 13:38 ` [Qemu-devel] [PATCH v2 0/2] fix coverity complaint Gerd Hoffmann
2016-05-13  0:22   ` Gonglei (Arei)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).