Skip to content

Commit 1e3e2ab

Browse files
authored
Merge pull request #112 from DariuszOstolski/master
Fixed core when tls is enabled but not used
2 parents 45e8dc1 + fc31df5 commit 1e3e2ab

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

memtier_benchmark.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,11 +1579,13 @@ int main(int argc, char *argv[])
15791579
}
15801580

15811581
#ifdef USE_TLS
1582-
if (cfg.openssl_ctx) {
1583-
SSL_CTX_free(cfg.openssl_ctx);
1584-
cfg.openssl_ctx = NULL;
1585-
}
1582+
if(cfg.tls) {
1583+
if (cfg.openssl_ctx) {
1584+
SSL_CTX_free(cfg.openssl_ctx);
1585+
cfg.openssl_ctx = NULL;
1586+
}
15861587

1587-
cleanup_openssl();
1588+
cleanup_openssl();
1589+
}
15881590
#endif
15891591
}

0 commit comments

Comments
 (0)