mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
messaging4: Fix a just-introduced error memleak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 22 15:31:38 CEST 2014 on sn-devel-104
This commit is contained in:
parent
478ef9493f
commit
a017280ca5
@ -969,6 +969,11 @@ NTSTATUS irpc_servers_byname(struct imessaging_context *msg_ctx,
|
||||
|
||||
count = rec.dsize / sizeof(struct server_id);
|
||||
if (count == 0) {
|
||||
/*
|
||||
* In a corrupted db we could end up with a record of size
|
||||
* less than a struct server_id. Don't leak in this case.
|
||||
*/
|
||||
free(rec.dptr);
|
||||
return NT_STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user