diff options
author | Volker Lendecke <vl@samba.org> | 2016-04-10 12:51:15 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-04-18 15:44:50 +0200 |
commit | 75f26e36f159035def45cc1aea178388279e6bfc (patch) | |
tree | 3bce104370a1f46fa787ea70fc2f4287ce3aea88 | |
parent | b7e46c14ea56e7827b00436b2c9180bfb5dc9713 (diff) | |
download | samba-75f26e36f159035def45cc1aea178388279e6bfc.tar.gz |
vfs_catia: Fix bug 11827, memleak
add_srt should add the mappings to the linked list even if
mappings==NULL (the default)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11827
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Apr 11 14:25:59 CEST 2016 on sn-devel-144
(cherry picked from commit 3e2af1568d150de1cb12fef40580f4880ac787ff)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Apr 18 15:44:50 CEST 2016 on sn-devel-104
-rw-r--r-- | source3/modules/vfs_catia.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index ff11a9a8d0d..b6e6cab509f 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -141,6 +141,9 @@ static struct share_mapping_entry *add_srt(int snum, const char **mappings) ret->snum = snum; + ret->next = srt_head; + srt_head = ret; + if (mappings) { ret->mappings = (struct char_mappings**) ((unsigned char*) ret + sizeof(struct share_mapping_entry)); @@ -176,9 +179,6 @@ static struct share_mapping_entry *add_srt(int snum, const char **mappings) } } - ret->next = srt_head; - srt_head = ret; - return ret; } |