struct guid_tdb_key,
dn_list->count);
+ if (key_values == NULL) {
+ talloc_free(keys);
+ return ldb_module_oom(ac->module);
+ }
for (i = 0; i < dn_list->count; i++) {
keys[i].dptr = key_values[i].guid_key;
keys[i].dsize = sizeof(key_values[i].guid_key);
}
- if (key_values == NULL) {
- return ldb_module_oom(ac->module);
- }
} else {
for (i = 0; i < dn_list->count; i++) {
keys[i].dptr = NULL;
&dn_list->dn[i],
&keys[num_keys]);
if (ret != LDB_SUCCESS) {
+ talloc_free(keys);
return ret;
}
bool matched;
msg = ldb_msg_new(ac);
if (!msg) {
+ talloc_free(keys);
return LDB_ERR_OPERATIONS_ERROR;
}
if (ret != LDB_SUCCESS && ret != LDB_ERR_NO_SUCH_OBJECT) {
/* an internal error */
+ talloc_free(keys);
talloc_free(msg);
return LDB_ERR_OPERATIONS_ERROR;
}
}
if (ret != LDB_SUCCESS) {
+ talloc_free(keys);
talloc_free(msg);
return ret;
}
talloc_free(msg);
if (ret == -1) {
+ talloc_free(keys);
return LDB_ERR_OPERATIONS_ERROR;
}
* is the callbacks responsiblity, and should
* not be talloc_free()'ed */
ac->request_terminated = true;
+ talloc_free(keys);
return ret;
}