r13803: fixed two errors found with 'make valgrindtest'
authorAndrew Tridgell <tridge@samba.org>
Fri, 3 Mar 2006 02:29:48 +0000 (02:29 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:52:12 +0000 (13:52 -0500)
(This used to be commit 4257fd91ceca34dd868a9168efc28b6cb63f0357)

source4/dsdb/samdb/ldb_modules/extended_dn.c
source4/lib/ldb/common/ldb_msg.c

index 5b288aa311570e0bbf35e6cc5b6b822285046cb0..25a8dd1d36be53d168a1119398168f126c9fe35c 100644 (file)
@@ -157,7 +157,7 @@ static BOOL inject_extended_dn(struct ldb_message *msg,
        val = ldb_msg_find_ldb_val(msg, "distinguishedName");
        if (val) {
                ldb_msg_remove_attr(msg, "distinguishedName");
-               if (ldb_msg_add_string(msg, "distinguishedName", new_dn))
+               if (ldb_msg_add_steal_string(msg, "distinguishedName", new_dn))
                        return False;
        }
 
index 8c59518296384084847164c8d9e052890d78b3b3..f76d7e8dd9a64814cb36237b91cdea816002cbfe 100644 (file)
@@ -263,7 +263,7 @@ int ldb_msg_add_fmt(struct ldb_message *msg,
        val.data   = (uint8_t *)str;
        val.length = strlen(str);
 
-       return ldb_msg_add_value(msg, attr_name, &val);
+       return ldb_msg_add_steal_value(msg, attr_name, &val);
 }
 
 /*