From 0dac363b00f7b66cbf2c5e9911ba4f7a297d0e42 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Jun 13 2017 06:22:05 +0000 Subject: Fix minor memory leak The variable 'filename' is created inside 'util_build_next_filename' that's not aware of talloc and therefore the allocated memory must be freed properly. --- diff --git a/src/submit-so.c b/src/submit-so.c index 17b28f5..daf11b7 100644 --- a/src/submit-so.c +++ b/src/submit-so.c @@ -144,6 +144,9 @@ cm_submit_so_main(int fd, struct cm_store_ca *ca, struct cm_store_entry *entry, ERR_error_string_n(error, buf, sizeof(buf)); cm_log(1, "%s\n", buf); } + if (filename != NULL && filename != entry->cm_key_storage_location) { + free(filename); + } if (status != 0) { _exit(status); }