From: Volker Lendecke Date: Sun, 15 Jul 2007 09:42:43 +0000 (+0000) Subject: r23879: Fix two memleaks, found by the IBM checker X-Git-Tag: samba-misc-tags/initial-v3-2-unstable~716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d1b33f51308c95293fa2494b47ba1255af8d216;p=thirdparty%2Fsamba.git r23879: Fix two memleaks, found by the IBM checker --- diff --git a/source/smbd/filename.c b/source/smbd/filename.c index 824c32867ac..a1b56736a09 100644 --- a/source/smbd/filename.c +++ b/source/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);