dsdb: acl_read fix a missed talloc_steal
authorMatthieu Patou <mat@matws.net>
Sat, 5 Mar 2011 19:22:00 +0000 (22:22 +0300)
committerMatthieu Patou <mat@samba.org>
Sun, 20 Mar 2011 10:27:26 +0000 (11:27 +0100)
source4/dsdb/samdb/ldb_modules/acl_read.c

index 4ed057cf63bed57639356805c739e5ec4eeb04d0..ae618ec639dc6402fbea05e7b8bfba704568fae4 100644 (file)
@@ -192,6 +192,7 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
                                 bool to_remove = aclread_is_inaccessible(&msg->elements[i]);
                                 if (!to_remove) {
                                         ret_msg->elements[k] = msg->elements[i];
+                                        talloc_steal(ret_msg->elements, msg->elements[i].name);
                                         talloc_steal(ret_msg->elements, msg->elements[i].values);
                                         k++;
                                 }