From d537225c4c467e8bda6e8f45b69a64c16c5ecb58 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 15 Jul 2007 09:42:43 +0000 Subject: r23879: Fix two memleaks, found by the IBM checker (This used to be commit 4d1b33f51308c95293fa2494b47ba1255af8d216) --- source3/smbd/filename.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 824c32867a..a1b56736a0 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -237,10 +237,12 @@ NTSTATUS unix_convert(connection_struct *conn, if (p) { if (p[2] == '/') { /* Error code within a pathname. */ - return NT_STATUS_OBJECT_PATH_NOT_FOUND; + result = NT_STATUS_OBJECT_PATH_NOT_FOUND; + goto fail; } else if (p[2] == '\0') { /* Error code at the end of a pathname. */ - return NT_STATUS_OBJECT_NAME_INVALID; + result = NT_STATUS_OBJECT_NAME_INVALID; + goto fail; } } stat_cache_add(orig_path, name, conn->case_sensitive); -- cgit