X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstream-ssl.c;h=c2a77a008a7840e679f9d4e68d4c3c5f80bf5930;hb=79b18681997dbba888ae61d9e1b079642f7b859a;hp=462ac4283e0be928023c669c1a6075840a22c58a;hpb=1e3c004749e1e0498dac6240b6edda472718dde2;p=openvswitch diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 462ac428..c2a77a00 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -478,6 +478,11 @@ ssl_close(struct stream *stream) * background. */ SSL_shutdown(sslv->ssl); + /* SSL_shutdown() might have signaled an error, in which case we need to + * flush it out of the OpenSSL error queue or the next OpenSSL operation + * will falsely signal an error. */ + ERR_clear_error(); + SSL_free(sslv->ssl); close(sslv->fd); free(sslv);