mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
spools: avoid leaking memory into the callers mem_ctx
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14675 CI: https://gitlab.com/samba-team/samba/-/merge_requests/1861 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 481176ec745c14b78fca68e01a61c83405a4b97b)
This commit is contained in:
parent
55c76604ca
commit
ed30ce7aa0
@ -5731,7 +5731,8 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (pinfo2->drivername == NULL || pinfo2->drivername[0] == '\0') {
|
||||
return WERR_UNKNOWN_PRINTER_DRIVER;
|
||||
result = WERR_UNKNOWN_PRINTER_DRIVER;
|
||||
goto done;
|
||||
}
|
||||
|
||||
DBG_INFO("Construct printer driver [%s] for [%s]\n",
|
||||
@ -7023,7 +7024,8 @@ static WERROR update_printer(struct pipes_struct *p,
|
||||
raddr = tsocket_address_inet_addr_string(p->remote_address,
|
||||
p->mem_ctx);
|
||||
if (raddr == NULL) {
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
result = WERR_NOT_ENOUGH_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* add_printer_hook() will call reload_services() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user