pam_fprintd: Clear the data value before setting it if set

This commit is contained in:
Marco Trevisan (Treviño) 2020-12-04 22:00:40 +01:00 committed by Benjamin Berg
parent 34a24eac77
commit a76af6ce71

View file

@ -203,6 +203,11 @@ verify_result (sd_bus_message *m,
if (debug)
pam_syslog (data->pamh, LOG_DEBUG, "Verify result: %s (done: %d)", result, done ? 1 : 0);
if (data->result) {
free (data->result);
data->result = NULL;
}
if (done) {
data->result = strdup (result);
return 0;