Skip to content

Fix segfault

Patrick Böker requested to merge patrickbkr/http-tiny:fix-close-segfault into master

OpenSSLs close must not be called more than once. That causes double frees, access to invalid memory or other nastiness. Handles are potentially closed multiple times: explicitly when it can't be reused, and then implicitly via DESTROY. The second call (via DESTROY) either directly segfaults or writes over / frees someone elses memory causing a segfault a bit later in some random other place.

Merge request reports