DEBUG("rlm_expiration: Account has expired");
- if (data->msg){
+ if (data->msg && data->msg[0]){
if (!radius_xlat(msg, sizeof(msg), data->msg, request, NULL)) {
radlog(L_ERR, "rlm_expiration: xlat failed.");
return RLM_MODULE_FAIL;
rlm_expiration_t *data = (rlm_expiration_t *) instance;
paircompare_unregister(PW_EXPIRATION, expirecmp);
- if (data->msg)
- free(data->msg);
free(instance);
return 0;
}
}
/*
- * If we are passed an empty reply-message don't use it
- */
- if (!strlen(data->msg)){
- free(data->msg);
- data->msg = NULL;
- }
-
- /*
* Register the expiration comparison operation.
*/
paircompare_register(PW_EXPIRATION, 0, expirecmp, data);