Skip to content

Commit

Permalink
Set pointer to NULL after free()
Browse files Browse the repository at this point in the history
Only when not a local variable.
  • Loading branch information
DimitriPapadopoulos committed Sep 6, 2023
1 parent 9037539 commit 49cd9fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ static void destroy_ssl_locks(void)
for (i = 0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&lockarray[i]);
OPENSSL_free(lockarray);
lockarray = NULL;
}
#else
static void init_ssl_locks(void)
Expand Down

0 comments on commit 49cd9fb

Please sign in to comment.