Skip to content

Commit

Permalink
Fixed memory leak in should_bypass_proxy during early exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Feb 3, 2023
1 parent aa3b5c5 commit 17b1b73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,10 @@ bool should_bypass_proxy(const char *url, const char *bypass_list) {
if (is_local)
should_bypass = true;

if (!bypass_list)
if (!bypass_list) {
free(host);
return should_bypass;
}

// Check for simple hostnames
if (strchr(host, '.') == NULL)
Expand Down

0 comments on commit 17b1b73

Please sign in to comment.