Fix missing TALLOC_FREE of stackframes.
authorJeremy Allison <jra@samba.org>
Tue, 7 May 2013 21:04:24 +0000 (14:04 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 May 2013 04:18:21 +0000 (06:18 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_aixacl2.c
source3/modules/vfs_gpfs.c

index c97cd577f2cf07a28f83ef8295b55e4f6020aaba..4ac6ada942fa981fd89009228ccc702a7a775535 100644 (file)
@@ -174,8 +174,10 @@ static NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle,
                return posix_fget_nt_acl(fsp, security_info,
                                         mem_ctx, ppdesc);
        }
-       if (result==False)
+       if (result==False) {
+               TALLOC_FREE(frame);
                return NT_STATUS_ACCESS_DENIED;
+       }
 
        status = smb_fget_nt_acl_nfs4(fsp, security_info, ppdesc,
                                      mem_ctx, pacl);
index 6056b7e0afb3a845212fbd8502157da643c21b1a..7f00eac5f68f7832a8bfc7410b7878d75837d634 100644 (file)
@@ -472,6 +472,7 @@ static NTSTATUS gpfsacl_get_nt_acl(vfs_handle_struct *handle,
        }
 
        /* GPFS ACL was not read, something wrong happened, error code is set in errno */
+       TALLOC_FREE(frame);
        return map_nt_error_from_unix(errno);
 }
 
@@ -1122,9 +1123,10 @@ static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
        DEBUG(10, ("gpfsacl_emu_chmod invoked for %s mode %o\n", path, mode));
 
        result = gpfs_get_nfs4_acl(frame, path, &pacl);
-       if (result)
+       if (result) {
                TALLOC_FREE(frame);
                return result;
+       }
 
        if (mode & ~(S_IRWXU | S_IRWXG | S_IRWXO)) {
                DEBUG(2, ("WARNING: cutting extra mode bits %o on %s\n", mode, path));