Added slightly better memory management after using meson […] -Db_sanitize=address.

This commit is contained in:
Heiko Reese
2021-09-12 21:47:57 +02:00
parent 643f1a6719
commit 15de3a6204
4 changed files with 11 additions and 14 deletions

View File

@ -7,10 +7,6 @@
#include <stdbool.h>
#include "common.c"
/* A note on memory management: this code lacks calls to free() for every malloc()ed piece of memory. This is deliberate
* as these processes are short-lived and calling free() right before an exit() seems kind of moot.
*/
#define ENVVAR_PASSWORD_NAME "LIBEXIM_PASSWORD"
void print_usage(char *progname) {
@ -162,4 +158,7 @@ int main(int argc, char *argv[]) {
} else {
fprintf(stdout, "%s", (const char *) cleartext);
}
free(cleartext);
exit(EXIT_SUCCESS);
}