Do not fail on NULL passed to OpenSSL_free

Some plugins might call it after deconstruction. Do not crash if there
is no reason for it.

(cherry picked from commit a26673a088)
This commit is contained in:
Petr Menšík
2019-01-25 21:47:37 +01:00
committed by Evan Hunt
parent dda175e108
commit af021f136e
2 changed files with 8 additions and 2 deletions

View File

@@ -160,9 +160,11 @@ mem_alloc(size_t size FLARG) {
static void
mem_free(void *ptr FLARG) {
INSIST(dst__memory_pool != NULL);
if (ptr != NULL)
if (ptr != NULL) {
INSIST(dst__memory_pool != NULL);
isc__mem_free(dst__memory_pool, ptr FLARG_PASS);
}
}
static void *