Skip to content

Commit

Permalink
lib/pam_pass_non_interactive.c: use strzero/free
Browse files Browse the repository at this point in the history
The combination of bzero and free could be optimized away.

Reviewed-by: Alejandro Colomar <[email protected]>
Signed-off-by: Samanta Navarro <[email protected]>
  • Loading branch information
ferivoz authored and hallyn committed Mar 14, 2024
1 parent fce1d88 commit 2b67dc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pam_pass_non_interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "alloc.h"
#include "attr.h"
#include "memzero.h"
#include "prototypes.h"
#include "shadowlog.h"

Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2b67dc7

Please sign in to comment.