qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] RDMA: Missing free in (probably unreachable) error path
@ 2015-06-22 15:18 Dr. David Alan Gilbert (git)
  2015-06-22 16:51 ` Andreas Färber
  2015-07-01  8:33 ` Juan Quintela
  0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2015-06-22 15:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: amit.shah, mrhines, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Coverity CID 1307773

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 migration/rdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/migration/rdma.c b/migration/rdma.c
index 53e611e..2a9e0ce 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3395,6 +3395,7 @@ static void *qemu_fopen_rdma(RDMAContext *rdma, const char *mode)
     QEMUFileRDMA *r = g_malloc0(sizeof(QEMUFileRDMA));
 
     if (qemu_file_mode_is_not_valid(mode)) {
+        g_free(r);
         return NULL;
     }
 
-- 
2.4.3

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

end of thread, other threads:[~2015-07-01  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-22 15:18 [Qemu-devel] [PATCH] RDMA: Missing free in (probably unreachable) error path Dr. David Alan Gilbert (git)
2015-06-22 16:51 ` Andreas Färber
2015-07-01  8:33 ` Juan Quintela

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).