[ovs-dev] [PATCH] stream-ssl: Fix memory leak on error path.

Ben Pfaff blp at ovn.org
Fri Oct 14 18:12:43 UTC 2016


The commit that this fixes is from 2009.

Reported-by: Kai-Wei Fan <fank at vmware.com>
Fixes: 9467fe624698 ("Add SSL support to "stream" library and OVSDB.")
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 lib/stream-ssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
index a5c32a1..dcafc2d 100644
--- a/lib/stream-ssl.c
+++ b/lib/stream-ssl.c
@@ -670,7 +670,7 @@ ssl_send(struct stream *stream, const void *buffer, size_t n)
         case EAGAIN:
             return n;
         default:
-            sslv->txbuf = NULL;
+            ssl_clear_txbuf(sslv);
             return -error;
         }
     }
-- 
2.1.3




More information about the dev mailing list