From 34305cd9daf874c9b1fdc5bf61b30521f8c5fc05 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 10 Apr 2016 12:51:15 +0200 Subject: [PATCH] vfs_catia: Fix bug 11827, memleak --- source3/modules/vfs_catia.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index c5d2b6a..377f085 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; } -- 1.7.9.5