if (dn == NULL) goto failed;
ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res);
+ if (ret != LDB_SUCCESS) {
+ goto failed;
+ }
talloc_steal(dn, res);
- if (ret != LDB_SUCCESS || res->count != 1) {
+ if (res->count != 1) {
goto failed;
}
if (expr == NULL) goto failed;
ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
+ if (ret != LDB_SUCCESS) {
+ goto failed;
+ }
talloc_steal(expr, res);
- if (ret != LDB_SUCCESS || res->count != 1) goto failed;
+ if (res->count != 1) {
+ goto failed;
+ }
if (!msg_to_group_map(res->msgs[0], map)) goto failed;
if (expr == NULL) goto failed;
ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
+ if (ret != LDB_SUCCESS) {
+ goto failed;
+ }
talloc_steal(expr, res);
- if (ret != LDB_SUCCESS || res->count != 1) goto failed;
+ if (res->count != 1) {
+ goto failed;
+ }
if (!msg_to_group_map(res->msgs[0], map)) goto failed;
}
ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res);
- talloc_steal(tmp_ctx, res);
if (ret != LDB_SUCCESS) goto failed;
+ talloc_steal(tmp_ctx, res);
(*pp_rmap) = NULL;
*p_num_entries = 0;
if (expr == NULL) goto failed;
ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, attrs, &res);
- talloc_steal(expr, res);
if (ret != LDB_SUCCESS) {
goto failed;
}
+ talloc_steal(expr, res);
for (i=0;i<res->count;i++) {
struct ldb_message_element *el;
}
ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, attrs, &res);
- talloc_steal(dn, res);
if (ret == LDB_SUCCESS && res->count == 0) {
+ talloc_free(res);
talloc_free(dn);
return NT_STATUS_OK;
}
talloc_free(dn);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+ talloc_steal(dn, res);
el = ldb_msg_find_element(res->msgs[0], "member");
if (el == NULL) {