s3:smbd: exit early if srv_send_smb fails
authorAurelien Aptel <aaptel@suse.com>
Wed, 15 Mar 2017 10:34:20 +0000 (11:34 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 16 Mar 2017 19:30:19 +0000 (20:30 +0100)
coverity fix.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/reply.c

index 22941ec256e549e46ad65012d1cb9635ed40f4c3..0979e6eb9566526bd5daab8e2cceb2b7806bfb72 100644 (file)
@@ -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");