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 4567d8a commit edd5719
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 edd5719

Please sign in to comment.