lib/pam_pass_non_interactive.c: use strzero/free

The combination of bzero and free could be optimized away.

Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
This commit is contained in:
Samanta Navarro
2024-03-14 17:20:30 -05:00
committed by Serge Hallyn
parent fce1d88479
commit 2b67dc7765
+3 -3
View File
@@ -19,6 +19,7 @@
#include "alloc.h"
#include "attr.h"
#include "memzero.h"
#include "prototypes.h"
#include "shadowlog.h"
@@ -97,9 +98,8 @@ static int ni_conv (int num_msg,
failed_conversation:
for (count=0; count < num_msg; count++) {
if (NULL != responses[count].resp) {
bzero(responses[count].resp,
strlen(responses[count].resp));
free (responses[count].resp);
strzero(responses[count].resp);
free(responses[count].resp);
responses[count].resp = NULL;
}
}