bind: fix possible double-frees in ssh_bind_free
bind: fix possible double-frees in ssh_bind_free

Make sure to explicitly set key pointers to NULL following the use
of 'ssh_key_free' throughout bind.c.

Before this change, a double free can happen via 'ssh_bind_free'
as in this example callpath:

  // create an ssh_bind
  ssh_bind b = ssh_bind_new();

  // provide a path to a wrong key-type
  ssh_bind_options_set(b, SSH_BIND_OPTIONS_DSAKEY, path_to_rsa_key);

  // initialize set key-type
  ssh_bind_listen(b);

    -> error path "The DSA host key has the wrong type: %d",

       ssh_key_free(sshbind->dsa)

         -> ssh_key_clean(key) // OK

         -> SAFE_FREE(key)     // OK, but, sshbind->dsa is *not* set to NULL

  // ssh_bind_listen failed, so clean up ssh_bind
  ssh_bind_free(b);

    -> ssh_key_free(sshbind->dsa)  // double-free here

To fix, set pointers to NULL that have been free'd with 'ssh_key_free'.

Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

elastichosts/libssh,wangshawn/libssh,kedazo/libssh,mwgoldsmith/ssh,mwgoldsmith/libssh,robxu9/libssh,taikoo/libssh,robxu9/libssh,Distrotech/libssh,elastichosts/libssh,DouglasHeriot/libssh,taikoo/libssh,pouete/libssh,sebadoom/libssh,robxu9/libssh,pouete/libssh,nviennot/libssh,sebadoom/libssh,nviennot/libssh,kedazo/libssh,kedazo/libssh,taikoo/libssh,mwgoldsmith/libssh,pouete/libssh,wangshawn/libssh,nviennot/libssh,mwgoldsmith/ssh,kedazo/libssh,Distrotech/libssh,sebadoom/libssh,Distrotech/libssh,taikoo/libssh,robxu9/libssh,nviennot/libssh,wangshawn/libssh,elastichosts/libssh,DouglasHeriot/libssh,mwgoldsmith/libssh,DouglasHeriot/libssh,Distrotech/libssh,mwgoldsmith/libssh,mwgoldsmith/ssh,wangshawn/libssh,mwgoldsmith/ssh,pouete/libssh,DouglasHeriot/libssh,sebadoom/libssh