1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

winbind: Save lines with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-11-30 14:28:54 +01:00 committed by Jeremy Allison
parent f25b6de771
commit 4156d37db1

View File

@ -99,19 +99,12 @@ static TLDAPRC get_attrnames_by_oids(struct tldap_context *ld,
size_t num_msgs;
filter = talloc_strdup(mem_ctx, "(|");
if (filter == NULL) {
return TLDAP_NO_MEMORY;
}
for (i=0; i<num_oids; i++) {
filter = talloc_asprintf_append_buffer(
filter, "(attributeId=%s)", oids[i]);
if (filter == NULL) {
return TLDAP_NO_MEMORY;
}
talloc_asprintf_addbuf(&filter, "(attributeId=%s)", oids[i]);
}
talloc_asprintf_addbuf(&filter, ")");
filter = talloc_asprintf_append_buffer(filter, ")");
if (filter == NULL) {
return TLDAP_NO_MEMORY;
}