Mark packets with invalid signature as "done".
*/
if (rad_decode(reply, radclient->request, secret) != 0) {
librad_perror("rad_decode");
- rad_free(&radclient->reply);
totallost++;
- return -1;
+ goto packet_done; /* shared secret is incorrect */
}
/* libradius debug already prints out the value pairs for us */
totaldeny++;
}
- if (radclient->reply) rad_free(&radclient->reply);
+packet_done:
+ rad_free(&radclient->reply);
/*
* Once we've sent the packet as many times as requested,