diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-17 10:14:56 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-17 10:14:56 +0000 |
| commit | 58fa7178e43a32d493015cd15a1dd29bcbdc49c0 (patch) | |
| tree | da2a02d14eac30b4f35659431091f785a5ec27b8 | |
| parent | 6ca10e383dd7dba708f1784acf42e78bd5990db2 (diff) | |
Core: add annotation to getter function about return value owner semantic
* lasso/id-ff/identity.c lasso/id-ff/profile.c:
precise owner semantic of lasso_profile_get_identity,
lasso_profile_get_session, lasso_profile_get_server
* lasso/id-wsf-2.0/saml2_login.c tests/login_tests_saml2.c:
in the same vein add missing release of assertion returned by
lasso_login_get_assertion which return a caller owned object.
| -rw-r--r-- | lasso/id-ff/identity.c | 2 | ||||
| -rw-r--r-- | lasso/id-ff/profile.c | 8 | ||||
| -rw-r--r-- | lasso/id-wsf-2.0/saml2_login.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lasso/id-ff/identity.c b/lasso/id-ff/identity.c index c1b71d06..e7e9179b 100644 --- a/lasso/id-ff/identity.c +++ b/lasso/id-ff/identity.c @@ -78,7 +78,7 @@ lasso_identity_add_federation(LassoIdentity *identity, LassoFederation *federati * * Looks up and returns the #LassoFederation for this provider ID. * - * Return value: the #LassoFederation; or NULL if it didn't exist. The + * Return value:(transfer none): the #LassoFederation; or NULL if it didn't exist. The * #LassoFederation is internally allocated. It must not be freed, * modified or stored. **/ diff --git a/lasso/id-ff/profile.c b/lasso/id-ff/profile.c index 9f7a6f63..6342fa14 100644 --- a/lasso/id-ff/profile.c +++ b/lasso/id-ff/profile.c @@ -92,7 +92,7 @@ cleanup: * identifier (which is actually a #LassoSamlNameIdentifier in ID-FF 1.2 and * #LassoSaml2NameID in SAML 2.0). * - * Return value: the name identifier or NULL if none was found. The #LassoNode + * Return value:(transfer none): the name identifier or NULL if none was found. The #LassoNode * object is internally allocated and must not be freed by the caller. **/ LassoNode* @@ -276,7 +276,7 @@ lasso_profile_is_liberty_query(const gchar *query) * * Gets the identity bound to @profile. * - * Return value: the identity or NULL if it none was found. The #LassoIdentity + * Return value:(transfer none): the identity or NULL if it none was found. The #LassoIdentity * object is internally allocated and must not be freed by the caller. **/ LassoIdentity* @@ -294,7 +294,7 @@ lasso_profile_get_identity(LassoProfile *profile) * * Gets the session bound to @profile. * - * Return value: the session or NULL if it none was found. The #LassoSession + * Return value:(transfer none): the session or NULL if it none was found. The #LassoSession * object is internally allocated and must not be freed by the caller. **/ LassoSession* @@ -464,7 +464,7 @@ lasso_profile_set_artifact_message(LassoProfile *profile, char *message) * Return the #LassoServer linked to this profile object. A profile object should always contains * one. It allows to find metadatas of other providers and to know our own metadatas. * - * Return value: a #LassoServer or NULL if profile is not a #LassoProfile or no #LassoServer object + * Return value: (transfer none): a #LassoServer or NULL if profile is not a #LassoProfile or no #LassoServer object * was setup at the creation of this profile. */ LassoServer* diff --git a/lasso/id-wsf-2.0/saml2_login.c b/lasso/id-wsf-2.0/saml2_login.c index 766afee2..1d6f4f69 100644 --- a/lasso/id-wsf-2.0/saml2_login.c +++ b/lasso/id-wsf-2.0/saml2_login.c @@ -81,6 +81,7 @@ lasso_login_idwsf2_add_discovery_bootstrap_epr(LassoLogin *login, const char *ur /* Check for the presence of an assertion */ assertion = (LassoSaml2Assertion*) lasso_login_get_assertion (login); if (! LASSO_IS_SAML2_ASSERTION (assertion)) { + lasso_release_gobject(assertion); return LASSO_PROFILE_ERROR_MISSING_ASSERTION; } lasso_extract_node_or_fail(server, login->parent.server, SERVER, @@ -119,6 +120,7 @@ lasso_login_idwsf2_add_discovery_bootstrap_epr(LassoLogin *login, const char *ur cleanup: + lasso_release_gobject(assertion); lasso_release_gobject(epr); lasso_release_gobject(metadata); lasso_release_gobject(attributeStatement); |
