Did not initialize pointer before using it, so that SAFE_FREE() won't free an uninitialized pointer.
I find vfs_hpuxacl.c file on the branch of v3-5-test still have the issue please take a look at following codes: int hpuxacl_sys_acl_delete_def_file(vfs_handle_struct *handle, const char *path) { SMB_ACL_T smb_acl; int ret = -1; HPUX_ACL_T hpux_acl; int count; DEBUG(10, ("entering hpuxacl_sys_acl_delete_def_file.\n")); smb_acl = hpuxacl_sys_acl_get_file(handle, path, SMB_ACL_TYPE_ACCESS); if (smb_acl == NULL) { DEBUG(10, ("getting file acl failed!\n")); goto done; } if (!smb_acl_to_hpux_acl(smb_acl, &hpux_acl, &count, SMB_ACL_TYPE_ACCESS)) { DEBUG(10, ("conversion smb_acl -> hpux_acl failed.\n")); goto done; } if (!hpux_acl_sort(hpux_acl, count)) { DEBUG(10, ("resulting acl is not valid!\n")); goto done; } ret = acl(discard_const_p(char, path), ACL_SET, count, hpux_acl); if (ret != 0) { DEBUG(10, ("settinge file acl failed!\n")); } done: DEBUG(10, ("hpuxacl_sys_acl_delete_def_file %s.\n", ((ret != 0) ? "failed" : "succeeded" ))); SAFE_FREE(smb_acl); return ret; } I think smb_acl and hpux_acl should need to initialize before using them. such as: SMB_ACL_T smb_acl=NULL; HPUX_ACL_T hpux_acl=NULL; Do you think so?
That is a Samba 3.X-specific issue.
Created attachment 6750 [details] Patch I fail to see the code path for smb_acl to remain uninitialized. The first instruction in the routine is an assignment to smb_acl. I do however see a memory leak for hpux_acl. Can you please describe the exact path to smb_acl to be used in an uninitialized way? And, can you review my patch? I don't have hpux readily available, so I can't really test this. Thanks, Volker
Created attachment 6753 [details] integrated patch Hi Volker, I have take a look at your patch, this is a part of we's modification. attachments is the integrated patch of vfs_hpuxacl.c file
Did you edit your .gitconfig according to http://wiki.samba.org/index.php/Using_Git_for_Samba_Development using $ git config --global user.email Your.Email@domain.com $ git config --global user.name "Your Real Name" ? And, "/tmp/tmp.patch" is not very informative as a commit message. Samba convention says that normally we describe a bit what the patch does when doing the git commit.
Thank you very much for your help Kingson