sftp: Fix memory leak on realloc failure
sftp: Fix memory leak on realloc failure

If realloc of sftp->ext->name or sftp->ext->data fails, the memory
previously allocated for the respective member is leaked. Fix this by
storing the return value of realloc() in a temporary variable which only
gets assigned to the respective sftp->ext member on success.

Signed-off-by: Tobias Klauser <9249c549618448e4c699e8032ba6c7f0d7fd4b7f@distanz.ch>
Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

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