Fix learning-switch STP breakage from "out_port" in flow stats request.
[sliver-openvswitch.git] / lib / vconn-ssl.c
index 4bc123b..383714a 100644 (file)
@@ -49,7 +49,7 @@
 #include <unistd.h>
 #include "dynamic-string.h"
 #include "ofpbuf.h"
-#include "openflow.h"
+#include "openflow/openflow.h"
 #include "packets.h"
 #include "poll-loop.h"
 #include "socket-util.h"
@@ -170,6 +170,7 @@ static int ssl_init(void);
 static int do_ssl_init(void);
 static bool ssl_wants_io(int ssl_error);
 static void ssl_close(struct vconn *);
+static void ssl_clear_txbuf(struct ssl_vconn *);
 static int interpret_ssl_error(const char *function, int ret, int error,
                                int *want);
 static void ssl_tx_poll_callback(int fd, short int revents, void *vconn_);
@@ -482,6 +483,8 @@ ssl_close(struct vconn *vconn)
 {
     struct ssl_vconn *sslv = ssl_vconn_cast(vconn);
     poll_cancel(sslv->tx_waiter);
+    ssl_clear_txbuf(sslv);
+    ofpbuf_delete(sslv->rxbuf);
     SSL_free(sslv->ssl);
     close(sslv->fd);
     free(sslv);