summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-10 20:14:29 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:33 +1000
commit5a4a11cb98460dfab0517636a1434e0a96009c4e (patch)
tree6d4f54abf8c56b972a3b119ee8945d0b483da9b2
parentba726b5580a7e946eb02631b0a03f9b2d2164a9b (diff)
downloadsamba-5a4a11cb98460dfab0517636a1434e0a96009c4e.tar.gz
samba-5a4a11cb98460dfab0517636a1434e0a96009c4e.tar.bz2
samba-5a4a11cb98460dfab0517636a1434e0a96009c4e.zip
s4-anr: check for allocation failure before use
-rw-r--r--source4/dsdb/samdb/ldb_modules/anr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index 68f007ebd9..15a8a7aa48 100644
--- a/source4/dsdb/samdb/ldb_modules/anr.c
+++ b/source4/dsdb/samdb/ldb_modules/anr.c
@@ -149,10 +149,10 @@ static int anr_replace_value(struct anr_context *ac,
if (match->length > 1 && match->data[0] == '=') {
struct ldb_val *match2 = talloc(mem_ctx, struct ldb_val);
- *match2 = data_blob_const(match->data+1, match->length - 1);
if (match2 == NULL){
return ldb_oom(ldb);
}
+ *match2 = data_blob_const(match->data+1, match->length - 1);
match = match2;
op = LDB_OP_EQUALITY;
} else {