don't call lasso_node_destroy on a NULL variable

This commit is contained in:
Frédéric Péters 2007-07-10 14:25:55 +00:00
parent d2930c3a73
commit 3e6322a8a0
1 changed files with 3 additions and 1 deletions

View File

@ -1779,7 +1779,9 @@ lasso_login_process_response_msg(LassoLogin *login, gchar *response_msg)
/* rebuild samlp:Response with response_msg */
profile->response = lasso_node_new_from_soap(response_msg);
if (! LASSO_IS_SAMLP_RESPONSE(profile->response) ) {
lasso_node_destroy(profile->response);
if (profile->response) {
lasso_node_destroy(profile->response);
}
profile->response = NULL;
return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG);
}