diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2004-09-27 14:04:50 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2004-09-27 14:04:50 +0000 |
| commit | 7f231e253bcc321ff6a4787082b8ce47b9dfb694 (patch) | |
| tree | eaad153ed1e95ba4bee25b137be86cb12cb6b874 | |
| parent | f4655423883a2ebddbff491581d4085507607049 (diff) | |
| download | lasso-7f231e253bcc321ff6a4787082b8ce47b9dfb694.tar.gz lasso-7f231e253bcc321ff6a4787082b8ce47b9dfb694.tar.xz lasso-7f231e253bcc321ff6a4787082b8ce47b9dfb694.zip | |
Fixed bug #294 : memory leak on name identifiers local variables in lasso_name_registration_init_request().
| -rw-r--r-- | lasso/id-ff/name_registration.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/lasso/id-ff/name_registration.c b/lasso/id-ff/name_registration.c index 3b82a825..40ca1c50 100644 --- a/lasso/id-ff/name_registration.c +++ b/lasso/id-ff/name_registration.c @@ -308,7 +308,7 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration, goto done; } - /* get federation */ + /* Get federation */ federation = lasso_identity_get_federation_ref(profile->identity, profile->remote_providerID); if (federation == NULL) { message(G_LOG_LEVEL_CRITICAL, "Federation not found\n"); @@ -412,6 +412,35 @@ lasso_name_registration_init_request(LassoNameRegistration *name_registration, lasso_federation_set_local_nameIdentifier(federation, local_nameIdentifier_node); done: + if (idpNameIdentifier != NULL) { + xmlFree(idpNameIdentifier); + } + if (idpNameQualifier != NULL) { + xmlFree(idpNameQualifier); + } + if (idpFormat != NULL) { + xmlFree(idpFormat); + } + + if (spNameIdentifier != NULL) { + xmlFree(spNameIdentifier); + } + if (spNameQualifier != NULL) { + xmlFree(spNameQualifier); + } + if (spFormat != NULL) { + xmlFree(spFormat); + } + + if (oldNameIdentifier != NULL) { + xmlFree(oldNameIdentifier); + } + if (oldNameQualifier != NULL) { + xmlFree(oldNameQualifier); + } + if (oldFormat != NULL) { + xmlFree(oldFormat); + } return ret; } |
