summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_hpuxacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_hpuxacl.c')
-rw-r--r--source3/modules/vfs_hpuxacl.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 1b5d8d087d..f8661b1134 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -386,7 +386,7 @@ int hpuxacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
done:
DEBUG(10, ("hpuxacl_sys_acl_delete_def_file %s.\n",
((ret != 0) ? "failed" : "succeeded" )));
- SAFE_FREE(smb_acl);
+ TALLOC_FREE(smb_acl);
return ret;
}
@@ -506,11 +506,8 @@ static SMB_ACL_T hpux_acl_to_smb_acl(HPUX_ACL_T hpux_acl, int count,
if (!_IS_OF_TYPE(hpux_acl[i], type)) {
continue;
}
- result = SMB_REALLOC(result,
- sizeof(struct smb_acl_t) +
- (sizeof(struct smb_acl_entry) *
- (result->count + 1)));
- if (result == NULL) {
+ result->acl = talloc_realloc(result, result->acl, struct smb_acl_entry, result->count + 1);
+ if (result->acl == NULL) {
DEBUG(10, ("error reallocating memory for SMB_ACL\n"));
goto fail;
}
@@ -534,7 +531,7 @@ static SMB_ACL_T hpux_acl_to_smb_acl(HPUX_ACL_T hpux_acl, int count,
}
goto done;
fail:
- SAFE_FREE(result);
+ TALLOC_FREE(result);
done:
DEBUG(10, ("hpux_acl_to_smb_acl %s\n",
((result == NULL) ? "failed" : "succeeded")));