mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
lib: Save intermediate NULL checks with talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
4156d37db1
commit
300ad4ff12
@ -877,21 +877,17 @@ char *ldb_dn_get_extended_linearized(TALLOC_CTX *mem_ctx, struct ldb_dn *dn, int
|
||||
(int)val.length,
|
||||
val.data);
|
||||
} else {
|
||||
p = talloc_asprintf_append_buffer(p, ";<%s=%.*s>",
|
||||
name,
|
||||
(int)val.length,
|
||||
val.data);
|
||||
talloc_asprintf_addbuf(&p, ";<%s=%.*s>",
|
||||
name,
|
||||
(int)val.length,
|
||||
val.data);
|
||||
}
|
||||
|
||||
talloc_free(val.data);
|
||||
|
||||
if (!p) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (dn->ext_comp_num && *linearized) {
|
||||
p = talloc_asprintf_append_buffer(p, ";%s", linearized);
|
||||
talloc_asprintf_addbuf(&p, ";%s", linearized);
|
||||
}
|
||||
|
||||
if (!p) {
|
||||
|
Loading…
Reference in New Issue
Block a user