From: Aurelien Aptel Date: Wed, 15 Mar 2017 10:34:20 +0000 (+0100) Subject: s3:smbd: exit early if srv_send_smb fails X-Git-Tag: tdb-1.3.13~455 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1eaafead1eccf832a25919582885ec15cc6617a7;p=thirdparty%2Fsamba.git s3:smbd: exit early if srv_send_smb fails coverity fix. Signed-off-by: Aurelien Aptel Reviewed-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 22941ec256e..0979e6eb956 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -779,7 +779,9 @@ void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_s DEBUG(5,("init msg_type=0x%x msg_flags=0x%x\n", msg_type, msg_flags)); - srv_send_smb(xconn, outbuf, false, 0, false, NULL); + if (!srv_send_smb(xconn, outbuf, false, 0, false, NULL)) { + exit_server_cleanly("reply_special: srv_send_smb failed."); + } if (CVAL(outbuf, 0) != 0x82) { exit_server_cleanly("invalid netbios session");