_libssh2_channel_forward_cancel: accessed struct after free

... and the assignment was pointless anyway since the struct was about
to be freed. Bug introduced in dde2b094.

Fixes #268
This commit is contained in:
Daniel Stenberg 2013-09-05 19:55:37 +02:00
parent c910cd382d
commit ff6c01e959

View File

@ -1,6 +1,6 @@
/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
* Copyright (c) 2005 Mikhail Gusarov <dottedmag@dottedmag.net>
* Copyright (c) 2008-2011 by Daniel Stenberg
* Copyright (c) 2008-2013 by Daniel Stenberg
*
* All rights reserved.
*
@ -670,8 +670,6 @@ int _libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener)
LIBSSH2_FREE(session, listener);
listener->chanFwdCncl_state = libssh2_NB_state_idle;
return 0;
}