Skip to content

Commit

Permalink
Fix con NULL issue
Browse files Browse the repository at this point in the history
A logic issue of NULL check
  • Loading branch information
codebylove authored Jan 18, 2025
1 parent 2814301 commit 84551ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tun2socks/SocksUdpGwClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static SocksUdpGwClient_connection * find_connection (SocksUdpGwClient *o, Socks
}

SocksUdpGwClient_connection *con = UPPER_OBJECT(tree_node, SocksUdpGwClient_connection, connections_tree_node);
if (!con && con->is_dns != is_dns) {
if (!con || con->is_dns != is_dns) {
return NULL;
}

Expand Down

0 comments on commit 84551ac

Please sign in to comment.