Message ID | 20190712212833.29280-3-vt@altlinux.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/5] ima-evm-utils: Fix null dereference from file2bin to memcpy | expand |
diff --git a/src/evmctl.c b/src/evmctl.c index e07cff4..c556d05 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -1827,6 +1827,7 @@ static char *get_password(void) if (tcsetattr(fileno(stdin), TCSANOW, &tmp_flags) != 0) { perror("tcsetattr"); + free(password); return NULL; } @@ -1836,6 +1837,7 @@ static char *get_password(void) /* restore terminal */ if (tcsetattr(fileno(stdin), TCSANOW, &flags) != 0) { perror("tcsetattr"); + free(password); return NULL; }