]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix an error path memleak
authorVolker Lendecke <vl@samba.org>
Tue, 4 Aug 2026 14:07:50 +0000 (16:07 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 Aug 2026 06:45:28 +0000 (06:45 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/smb1_negprot.c

index 3e02c30d8b066f35be79d80f495c0eda2e62ee56..db96b3ffceb01eec635130852505cceb9801f50d 100644 (file)
@@ -325,12 +325,12 @@ static NTSTATUS reply_nt1(struct smb_request *req, uint16_t choice)
                }
 
                ret = message_push_blob(&req->outbuf, spnego_blob);
+               data_blob_free(&spnego_blob);
                if (ret == -1) {
                        DEBUG(0, ("Could not push spnego blob\n"));
                        reply_nterror(req, NT_STATUS_NO_MEMORY);
                        return NT_STATUS_NO_MEMORY;
                }
-               data_blob_free(&spnego_blob);
 
                SCVAL(req->outbuf,smb_vwv16+1, 0);
                DEBUG(3,("using SPNEGO\n"));