diff --git a/src/rx/rx_identity.c b/src/rx/rx_identity.c index 7f50ed038e..514d97be59 100644 --- a/src/rx/rx_identity.c +++ b/src/rx/rx_identity.c @@ -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); }