mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
rx: Don't crash when emptying an empty identity
In common with our other freeContents functions, freeing the contents of a structure which is already empty shouldn't crash. Change-Id: I93b54c0e450d2184c10575b50dadfd1471d43289 Reviewed-on: http://gerrit.openafs.org/3606 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
616763cd07
commit
a7fb426259
@ -164,8 +164,11 @@ rx_identity_new(rx_identity_kind kind, char *displayName, void *enameData,
|
||||
void
|
||||
rx_identity_freeContents(struct rx_identity *identity)
|
||||
{
|
||||
rxi_Free(identity->displayName, strlen(identity->displayName));
|
||||
identity->displayName = NULL;
|
||||
if (identity->displayName) {
|
||||
rxi_Free(identity->displayName, strlen(identity->displayName));
|
||||
identity->displayName = NULL;
|
||||
}
|
||||
|
||||
rx_opaque_freeContents(&identity->exportedName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user