Mercurial > trustbridge
changeset 944:76c410aff382
Fix two "memory leaks"
Not really a leak as they are part of main and thus only executed once
but this makes memory analysis easier.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 26 Aug 2014 17:03:03 +0200 |
parents | e43e6769269a |
children | 56ca8f2fd433 |
files | cinst/main.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cinst/main.c Tue Aug 26 17:01:49 2014 +0200 +++ b/cinst/main.c Tue Aug 26 17:03:03 2014 +0200 @@ -261,6 +261,7 @@ } all_valid_certs = get_certs_from_list (certificate_list, list_len); + free (certificate_list); if (!all_valid_certs) { @@ -280,6 +281,7 @@ } #endif ret = write_stores_nss (NULL, all_valid_certs); + strv_free (all_valid_certs); return ret; } @@ -319,6 +321,8 @@ } } + strv_free (all_valid_certs); + #ifdef WIN32 ret = write_stores_win (to_install, to_remove); if (ret != 0) @@ -335,7 +339,6 @@ /* Make valgrind happy */ strv_free (to_install); strv_free (to_remove); - free (certificate_list); return 0; }