Skip to content

Commit

Permalink
Only free API data when the API was started
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Jan 13, 2024
1 parent b7f49e9 commit e35aa78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void init_api(void)

void free_api(void)
{
if(auth_data == NULL)
return;

// Store sessions in database
backup_db_sessions(auth_data, max_sessions);
max_sessions = 0;
Expand Down

0 comments on commit e35aa78

Please sign in to comment.