}
memset (result, 0, sizeof (*result));
+ result->auth_statement.xml_string = strdup("");
log.debug ("get attrs for client at %s", argp->cookie.client_addr);
log.debug ("cookie: %s", argp->cookie.cookie);
// grab the attributes for this resource
Iterator<SAMLAssertion*> iter = entry->getAssertions();
u_int size = iter.size();
- result->assertions.assertions_len = size;
// if we have assertions...
if (size) {
// Build the response section
- ShibRpcXML* av = (ShibRpcXML*) malloc (size * sizeof (ShibRpcXML));
- result->assertions.assertions_val = av;
+ ShibRpcXML* av = (ShibRpcXML*) malloc (size * sizeof (ShibRpcXML));
// and then serialize them all...
u_int i = 0;
os << *as;
av[i++].xml_string = strdup(os.str().c_str());
}
+
+ // Set the results, once we know we've succeeded.
+ result->assertions.assertions_len = size;
+ result->assertions.assertions_val = av;
}
}
catch (SAMLException &e) {
// Now grab the serialized authentication statement
+ free(result->auth_statement.xml_string);
result->auth_statement.xml_string = strdup(entry->getSerializedStatement());
-
+
entry->unlock();
// and let it fly