summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c
index fcbcf0f421..341fad4bd9 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sam.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c
@@ -67,7 +67,7 @@ static struct ldb_message_element *generate_primaryGroupID(struct ldb_module *mo
el->name = talloc_strdup(ctx, "primaryGroupID");
el->num_values = 1;
el->values = talloc_array(ctx, struct ldb_val, 1);
- el->values[0].data = (uint8_t *)talloc_strdup(ctx, strchr(sid, '-')+1);
+ el->values[0].data = (uint8_t *)talloc_strdup(el->values, strchr(sid, '-')+1);
el->values[0].length = strlen((char *)el->values[0].data);
return el;