Skip to content

Commit

Permalink
UI: Fix memleak in version check.
Browse files Browse the repository at this point in the history
Once per lifetime leak, but headers should ofc be freed.
  • Loading branch information
dsvensson committed Jan 11, 2025
1 parent 32bf773 commit d9e3e1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,14 @@ static int VersionCheck_Thread(void *args)

cleanup:
if (root != NULL)
{
json_decref(root);
}
if (curl != NULL)
{
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}

SDL_LockMutex(version_mutex);
version_refreshing = false;
Expand Down

0 comments on commit d9e3e1b

Please sign in to comment.