Skip to contentSkip to conversation

rdma: memory leak InetSocketAddress

PATCH In review Frank 3 participants 4 messages Sep 12, 2013 – Feb 18, 2014

lore
Share & tools
lore

Frank

author
#0 lore raw

PATCH 1/1 rdma: memory leak InetSocketAddress

It is allocated by g_new0() in inet_parse(), so needs to be freed in qemu_rdma_data_init().

Quoted 1 line

From d7a8d1aad11fbe9af389cf9dd6cee14cc3249b1f Mon Sep 17 00:00:00 2001

From: Frank Yang <[email protected]>
Date: Thu, 12 Sep 2013 21:37:56 +0800
Subject: [PATCH] rdma: memory leak InetSocketAddress

---
 migration-rdma.c | 1 +
 1 file changed, 1 insertion(+)
migration-rdma.c +1 -0
index 05a155b..bcbe2d2 100644
@@ -2512,6 +2512,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
         }
     }
 
+    qapi_free_InetSocketAddress(addr);
     return rdma;
 }
 
Signature · 4 lines
1.8.3.msysgit.0

-- 
Frank
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Frank

It is allocated by g_new0() in inet_parse(), so needs to be freed in qemu_rdma_data_init().

From d7a8d1aad11fbe9af389cf9dd6cee14cc3249b1f Mon Sep 17 00:00:00 2001
From: Frank Yang <[email protected]>
Date: Thu, 12 Sep 2013 21:37:56 +0800
Subject: [PATCH] rdma: memory leak InetSocketAddress

---
 migration-rdma.c | 1 +
 1 file changed, 1 insertion(+)
migration-rdma.c +0 -0
index 05a155b..bcbe2d2 100644

migration-rdma.c static void *qemu_rdma_data_init(const char *host_port, Error **errp) · line 2518

Quoted 7 lines
migration-rdma.c +1 -0
@@ -2512,6 +2512,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
         }
     }
 
+    qapi_free_InetSocketAddress(addr);
     return rdma;
 }
 
#2 lore raw
In reply to Frank

Quoting Frank (2013-09-12 08:51:56)

Quoted 8 lines

It is allocated by g_new0() in inet_parse(), so needs to be freed in qemu_rdma_data_init().

From d7a8d1aad11fbe9af389cf9dd6cee14cc3249b1f Mon Sep 17 00:00:00 2001
From: Frank Yang <[email protected]>
Date: Thu, 12 Sep 2013 21:37:56 +0800
Subject: [PATCH] rdma: memory leak InetSocketAddress

Ping, looking to pull this in for 1.7.1

Quoted 21 lines
---
 migration-rdma.c | 1 +
 1 file changed, 1 insertion(+)
migration-rdma.c +1 -0
index 05a155b..bcbe2d2 100644
@@ -2512,6 +2512,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
         }
     }
 
+    qapi_free_InetSocketAddress(addr);
     return rdma;
 }
 
Signature · 4 lines
1.8.3.msysgit.0

-- 
Frank
#3 lore raw
Quoted 10 lines · Michael Roth

Quoting Frank (2013-09-12 08:51:56)

Quoted 8 lines

It is allocated by g_new0() in inet_parse(), so needs to be freed in qemu_rdma_data_init().

From d7a8d1aad11fbe9af389cf9dd6cee14cc3249b1f Mon Sep 17 00:00:00 2001
From: Frank Yang <[email protected]>
Date: Thu, 12 Sep 2013 21:37:56 +0800
Subject: [PATCH] rdma: memory leak InetSocketAddress

Ping, looking to pull this in for 1.7.1

Actually, this fix is not fully correct. Let me re-send.

- Michael

Quoted 22 lines
Quoted 21 lines
---
  migration-rdma.c | 1 +
  1 file changed, 1 insertion(+)
migration-rdma.c +1 -0
index 05a155b..bcbe2d2 100644
@@ -2512,6 +2512,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
          }
      }
 
+    qapi_free_InetSocketAddress(addr);
      return rdma;
  }
 
Signature · 4 lines
1.8.3.msysgit.0

-- 
Frank