mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: Fix memory leak SRXAFSCB_GetCellServ
In commit19f1e0f7cf
strdup() was replaced by xdr_alloc() and memcpy(). Unfortunately, the patch was wrong and the pointer to which the result of xdr_alloc() was assigned was overwritten with zero. Reviewed-on: http://gerrit.openafs.org/8162 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com> (cherry picked from commit137ea396db
) Change-Id: Ia15bcbeec4ad3ff411fd599e2d57f1ead4c3be23 Reviewed-on: http://gerrit.openafs.org/8643 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
d9b7f61546
commit
a30a4dc211
@ -1142,7 +1142,7 @@ GetCellCommon(afs_int32 a_cellnum, char **a_name, serverList *a_hosts)
|
||||
if (!cellp) {
|
||||
*a_name = (char *)xdr_alloc(sizeof(char));
|
||||
if (*a_name)
|
||||
*a_name = '\0';
|
||||
*a_name[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user