Skip to content

Commit

Permalink
Merge pull request #993 from qw-ctf/versionmemleak
Browse files Browse the repository at this point in the history
UI: Fix memleak in version check.
  • Loading branch information
dsvensson authored Jan 11, 2025
2 parents 32bf773 + d9e3e1b commit 00c18ad
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 00c18ad

Please sign in to comment.