Clean up streams on free

This commit is contained in:
jmjatlanta 2017-08-03 13:36:13 -05:00
parent 48c4b5ade0
commit c6f4a83051

View file

@ -45,6 +45,8 @@ int libp2p_session_context_free(struct SessionContext* context) {
if (context->default_stream != NULL)
context->default_stream->close(context);
context->default_stream = NULL;
context->insecure_stream = NULL;
context->secure_stream = NULL;
free(context);
}
return 1;