[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 3/4] rpc: avoid memory leak on error



Detected by Coverity.  The leak is on an error path, but I'm not
sure whether that path is likely to be triggered in practice.

* src/rpc/virnetserverservice.c (virNetServerServiceAccept): Plug
leak.
---
 src/rpc/virnetserverservice.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index e84f72c..fcd783c 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -83,6 +83,7 @@ cleanup:

 error:
     virNetSocketFree(clientsock);
+    virNetServerClientFree(client);
 }


-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]