[PATCH 2 of 5] Fix two "memory leaks"
Wald Commits
scm-commit at wald.intevation.org
Tue Aug 26 17:04:40 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409065383 -7200
# Node ID 76c410aff3821f59e98af6ad2ebd60f719c44eb2
# Parent e43e6769269a6c60010ceaef4854c44c8e351ba7
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.
diff -r e43e6769269a -r 76c410aff382 cinst/main.c
--- 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;
}
More information about the Trustbridge-commits
mailing list