in client_input_channel_req if the channel_lookup(id) is unsuccesful the error is reported, the variable c is still NULL and later is dereferenced in c->remote_id.
Created attachment 1962 [details] Patch solving the problem Yes, that is a bug.
Patch applied - this will be in OpenSSH 5.7
Move resolved bugs to CLOSED after 5.7 release