diff options
author | Volker Lendecke <vl@samba.org> | 2014-07-22 10:34:08 +0000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-07-22 15:31:38 +0200 |
commit | a017280ca554a534d9422a055b1cfc0baa3eb8c6 (patch) | |
tree | bd63962946ce5c9bd455571f0763a4dc4d34a788 /source4/lib/messaging/messaging.c | |
parent | 478ef9493f131c4d94bada708f790db3254f0a59 (diff) | |
download | samba-a017280ca554a534d9422a055b1cfc0baa3eb8c6.tar.gz samba-a017280ca554a534d9422a055b1cfc0baa3eb8c6.tar.xz samba-a017280ca554a534d9422a055b1cfc0baa3eb8c6.zip |
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
Diffstat (limited to 'source4/lib/messaging/messaging.c')
-rw-r--r-- | source4/lib/messaging/messaging.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 137d859f2b..4242b1cc85 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -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; } |