Blame SOURCES/covscan-memory-leaks.patch
|
|
430cf6 |
diff --git a/src/evmctl.c b/src/evmctl.c
|
|
|
430cf6 |
index 2ffee78..b80a1c9 100644
|
|
|
430cf6 |
--- a/src/evmctl.c
|
|
|
430cf6 |
+++ b/src/evmctl.c
|
|
|
430cf6 |
@@ -1716,7 +1716,7 @@ static char *get_password(void)
|
|
|
430cf6 |
|
|
|
430cf6 |
if (tcsetattr(fileno(stdin), TCSANOW, &tmp_flags) != 0) {
|
|
|
430cf6 |
perror("tcsetattr");
|
|
|
430cf6 |
- return NULL;
|
|
|
430cf6 |
+ goto get_pwd_err;
|
|
|
430cf6 |
}
|
|
|
430cf6 |
|
|
|
430cf6 |
printf("PEM password: ");
|
|
|
430cf6 |
@@ -1725,10 +1725,14 @@ static char *get_password(void)
|
|
|
430cf6 |
/* restore terminal */
|
|
|
430cf6 |
if (tcsetattr(fileno(stdin), TCSANOW, &flags) != 0) {
|
|
|
430cf6 |
perror("tcsetattr");
|
|
|
430cf6 |
- return NULL;
|
|
|
430cf6 |
+ goto get_pwd_err;
|
|
|
430cf6 |
}
|
|
|
430cf6 |
|
|
|
430cf6 |
+ free(password);
|
|
|
430cf6 |
return pwd;
|
|
|
430cf6 |
+get_pwd_err:
|
|
|
430cf6 |
+ free(password);
|
|
|
430cf6 |
+ return NULL;
|
|
|
430cf6 |
}
|
|
|
430cf6 |
|
|
|
430cf6 |
int main(int argc, char *argv[])
|
|
|
430cf6 |
diff --git a/src/libimaevm.c b/src/libimaevm.c
|
|
|
430cf6 |
index 6fa0ed4..39582f2 100644
|
|
|
430cf6 |
--- a/src/libimaevm.c
|
|
|
430cf6 |
+++ b/src/libimaevm.c
|
|
|
430cf6 |
@@ -466,6 +466,8 @@ void init_public_keys(const char *keyfiles)
|
|
|
430cf6 |
entry->next = public_keys;
|
|
|
430cf6 |
public_keys = entry;
|
|
|
430cf6 |
}
|
|
|
430cf6 |
+
|
|
|
430cf6 |
+ free(tmp_keyfiles);
|
|
|
430cf6 |
}
|
|
|
430cf6 |
|
|
|
430cf6 |
int verify_hash_v2(const char *file, const unsigned char *hash, int size,
|
|
|
430cf6 |
--
|
|
|
430cf6 |
2.14.4
|
|
|
430cf6 |
|