socket: Check return value of buffer function.
socket: Check return value of buffer function.

Found by Coverity.

Distrotech/libssh,kedazo/libssh,nviennot/libssh,mwgoldsmith/libssh,robxu9/libssh,sebadoom/libssh,robxu9/libssh,sebadoom/libssh,mwgoldsmith/ssh,mwgoldsmith/libssh,bigcat26/libssh-mod,nviennot/libssh,mwgoldsmith/ssh,wangshawn/libssh,pouete/libssh,Distrotech/libssh,Distrotech/libssh,taikoo/libssh,robxu9/libssh,DouglasHeriot/libssh,nviennot/libssh,wangshawn/libssh,robxu9/libssh,jt1/honeypot-libssh,jt1/honeypot-libssh,DouglasHeriot/libssh,elastichosts/libssh,elastichosts/libssh,bigcat26/libssh-mod,mwgoldsmith/ssh,kedazo/libssh,pouete/libssh,pouete/libssh,taikoo/libssh,mwgoldsmith/ssh,kedazo/libssh,jt1/honeypot-libssh,sebadoom/libssh,sebadoom/libssh,nviennot/libssh,mwgoldsmith/libssh,DouglasHeriot/libssh,bigcat26/libssh-mod,bigcat26/libssh-mod,mwgoldsmith/libssh,Distrotech/libssh,taikoo/libssh,pouete/libssh,wangshawn/libssh,kedazo/libssh,elastichosts/libssh,taikoo/libssh,wangshawn/libssh,jt1/honeypot-libssh,DouglasHeriot/libssh