[PATCH] vpn: Do not access invalid hash table pointer

Daniel Wagner wagi at monom.org
Sun Nov 25 22:57:37 PST 2012

On 26.11.2012 05:13, Praveen C wrote:
> Hi Daniel,
> The g_hash_table_lookup routine already has a NULL check for the hash
> handle.
> So your patch doesn't makes sense to me.

Dunno, the table is not initializes, but the code assumes it. So there 
is a logic error. My patch tries to fix the logic error not the hash 
table access.

g_return_val_if_fail is anyway kind of stupid. Anyone who relies on this 
check will make the user nervous, because of the warnings. And if it's 
not on purpose the program will crash quite likely, see above.

More information about the connman mailing list