smb1cli_conn_set_encryption talloc move s3-libsmb: Convert struct smb_trans_enc_state...
[metze/samba/wip.git] / libcli / smb / smbXcli_base.c
index fe85b3168054e29c1dcd19d476b2613799bac802..270b9c338c61da779214dbf5389268a60143f897 100644 (file)
@@ -214,10 +214,13 @@ static int smbXcli_conn_destructor(struct smbXcli_conn *conn)
                DLIST_REMOVE(conn->sessions, conn->sessions);
        }
 
+<<<<<<< HEAD
        if (conn->smb1.trans_enc) {
                TALLOC_FREE(conn->smb1.trans_enc);
        }
 
+=======
+>>>>>>> 7efc635... s3-libsmb: Convert struct smb_trans_enc_state to talloc
        return 0;
 }
 
@@ -595,13 +598,18 @@ bool smb1cli_conn_signing_is_active(struct smbXcli_conn *conn)
 }
 
 void smb1cli_conn_set_encryption(struct smbXcli_conn *conn,
-                                struct smb_trans_enc_state *es)
+                                struct smb_trans_enc_state **es)
 {
        /* Replace the old state, if any. */
+<<<<<<< HEAD
        if (conn->smb1.trans_enc) {
                TALLOC_FREE(conn->smb1.trans_enc);
        }
        conn->smb1.trans_enc = es;
+=======
+       TALLOC_FREE(conn->smb1.trans_enc);
+       conn->smb1.trans_enc = talloc_move(conn, es);
+>>>>>>> 7efc635... s3-libsmb: Convert struct smb_trans_enc_state to talloc
 }
 
 bool smb1cli_conn_encryption_on(struct smbXcli_conn *conn)