Free the memory talloc'd
authorRichard Sharpe <realrichardsharpe@gmail.com>
Tue, 27 Sep 2011 05:25:43 +0000 (22:25 -0700)
committerVolker Lendecke <vlendec@samba.org>
Tue, 27 Sep 2011 16:51:47 +0000 (18:51 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Sep 27 18:51:47 CEST 2011 on sn-devel-104

source3/modules/vfs_default.c

index 2dc7ec75b82d3ebc9b04c5ee02dcb6883c093a0c..745b36c97c5a4e89886a6d659f545f43bfa01bd0 100644 (file)
@@ -1621,6 +1621,7 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *handle,
 {
        NTSTATUS status;
        char *path;
+       bool offline = false;
 
         if (ISDOT(fname->base_name) || ISDOTDOT(fname->base_name)) {
                return false;
@@ -1639,7 +1640,11 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *handle,
                 return false;
         }
 
-       return (dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE) != 0;
+       offline = dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE != 0;
+
+       TALLOC_FREE(path);
+
+       return offline;
 }
 
 static int vfswrap_set_offline(struct vfs_handle_struct *handle,