summaryrefslogtreecommitdiff
path: root/pam
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2020-12-04 22:00:40 +0100
committerBenjamin Berg <bberg@redhat.com>2020-12-07 15:27:14 +0100
commita76af6ce719b9c43dd86ffd6ead90dfec0d2c294 (patch)
tree4da8a7f5f15ade0bd7f71611c29163c028ccaaad /pam
parent34a24eac7747596ae97b346013ae7216bcded785 (diff)
pam_fprintd: Clear the data value before setting it if set
Diffstat (limited to 'pam')
-rw-r--r--pam/pam_fprintd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c
index 036e2f5..d7d0681 100644
--- a/pam/pam_fprintd.c
+++ b/pam/pam_fprintd.c
@@ -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;