]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23879: Fix two memleaks, found by the IBM checker
authorVolker Lendecke <vlendec@samba.org>
Sun, 15 Jul 2007 09:42:43 +0000 (09:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:37 +0000 (12:28 -0500)
source/smbd/filename.c

index 824c32867ac5262f164e895a8afee82d003cdfe8..a1b56736a09393ef13b7b55071b3877bc7973d65 100644 (file)
@@ -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);