diff options
author | dequis <dx@dxzone.com.ar> | 2016-02-18 08:17:08 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-02-18 08:17:08 -0300 |
commit | 242f280339195f878973dd7f1e8c3e9233d61c0a (patch) | |
tree | 032780ae77033179b4129cb3f4159ed3cd2ad747 /lib/json.c | |
parent | 94562555d64001fc5517b328d1c8b8493dfd09cd (diff) |
Fix a double free when calling proxy_disconnect() inside phb->func()
Fixes trac ticket #1248
proxy_connected() calls phb->func(), then tries to do phb_free() directly
afterwards, but that might have been freed by a proxy_disconnect() call
during the execution of that callback.
This one happened to several different people because some AIM server
broke recently.
This commit fixes it by implementing a phb_connected() function that
removes the PHB from the hash table before calling phb->func(), which
ensures that any proxy_disconnect() calls just close the fd and nothing
else.
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions