s3:mapping_tdb: fix the del_aliasmem() function
authorStefan Metzmacher <metze@samba.org>
Thu, 18 Sep 2008 03:01:47 +0000 (05:01 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 29 Sep 2008 14:36:10 +0000 (16:36 +0200)
We should not cancel the transaction, when we want to delete a key.

metze

source3/groupdb/mapping_tdb.c

index 7cee53a9689cebdb261cb548464b5398b8c72e26..29927eb592b7230a6a4617fb11d94e041d7d66e9 100644 (file)
@@ -666,8 +666,7 @@ static NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member)
 
        if (num == 0) {
                status = dbwrap_delete_bystring(db, key);
-               TALLOC_FREE(sids);
-               goto cancel;
+               goto commit;
        }
 
        member_string = talloc_strdup(sids, "");
@@ -693,7 +692,7 @@ static NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member)
 
        status = dbwrap_store_bystring(
                db, key, string_term_tdb_data(member_string), 0);
-
+ commit:
        TALLOC_FREE(sids);
 
        if (!NT_STATUS_IS_OK(status)) {