mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DEVEL15-windows-pioctl-listlink-20071222
LICENSE MIT In the error case (1) reference the mountPointString instead of the output of cm_AssembleLink() which was not generated and (2) do not free memory and objects that were not allocated nor reference counted. (cherry picked from commit 111fb3a0a9525bb9d618dfa23cd1df3eb8eb61c5)
This commit is contained in:
parent
84cf7ecd86
commit
e3c7a1e756
@ -1922,13 +1922,11 @@ long cm_IoctlListlink(struct smb_ioctl *ioctlp, struct cm_user *userp)
|
||||
scp->fileType == CM_SCACHETYPE_DFSLINK ||
|
||||
code == CM_ERROR_NOSUCHPATH &&
|
||||
scp->fileType == CM_SCACHETYPE_INVALID) {
|
||||
|
||||
cp = ioctlp->outDatap;
|
||||
StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), spacep->data);
|
||||
StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), scp->mountPointStringp);
|
||||
cp += strlen(cp) + 1;
|
||||
ioctlp->outDatap = cp;
|
||||
cm_FreeSpace(spacep);
|
||||
if (newRootScp != NULL)
|
||||
cm_ReleaseSCache(newRootScp);
|
||||
code = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user