diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-09-15 11:25:35 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-09-15 11:25:35 +0200 |
commit | 13707999f1c3d9b4ca67da1e428993a37de23b52 (patch) | |
tree | d9784350dd051b8221c894e1d0481e391e2b2c12 | |
parent | 5503c78160d701b85cecfe20af670808becacd39 (diff) | |
download | exchange-13707999f1c3d9b4ca67da1e428993a37de23b52.tar.gz exchange-13707999f1c3d9b4ca67da1e428993a37de23b52.zip |
fix leaks in auditordb
-rw-r--r-- | src/auditordb/plugin_auditordb_postgres.c | 1 | ||||
-rw-r--r-- | src/auditordb/test_auditordb.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c index 863e20582..9450ae94f 100644 --- a/src/auditordb/plugin_auditordb_postgres.c +++ b/src/auditordb/plugin_auditordb_postgres.c | |||
@@ -143,6 +143,7 @@ connect_to_postgres (struct PostgresClosure *pc) | |||
143 | TALER_LOG_ERROR ("Database connection failed: %s\n", | 143 | TALER_LOG_ERROR ("Database connection failed: %s\n", |
144 | PQerrorMessage (conn)); | 144 | PQerrorMessage (conn)); |
145 | GNUNET_break (0); | 145 | GNUNET_break (0); |
146 | PQfinish (conn); | ||
146 | return NULL; | 147 | return NULL; |
147 | } | 148 | } |
148 | PQsetNoticeReceiver (conn, | 149 | PQsetNoticeReceiver (conn, |
diff --git a/src/auditordb/test_auditordb.c b/src/auditordb/test_auditordb.c index f286660fb..8f1b7da8a 100644 --- a/src/auditordb/test_auditordb.c +++ b/src/auditordb/test_auditordb.c | |||
@@ -159,10 +159,13 @@ run (void *cls) | |||
159 | struct TALER_DenominationPrivateKey denom_priv; | 159 | struct TALER_DenominationPrivateKey denom_priv; |
160 | struct TALER_DenominationPublicKey denom_pub; | 160 | struct TALER_DenominationPublicKey denom_pub; |
161 | struct GNUNET_HashCode denom_pub_hash; | 161 | struct GNUNET_HashCode denom_pub_hash; |
162 | |||
162 | denom_priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_create (1024); | 163 | denom_priv.rsa_private_key = GNUNET_CRYPTO_rsa_private_key_create (1024); |
163 | denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_private_key_get_public ( | 164 | denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_private_key_get_public ( |
164 | denom_priv.rsa_private_key); | 165 | denom_priv.rsa_private_key); |
165 | GNUNET_CRYPTO_rsa_public_key_hash (denom_pub.rsa_public_key, &denom_pub_hash); | 166 | GNUNET_CRYPTO_rsa_public_key_hash (denom_pub.rsa_public_key, &denom_pub_hash); |
167 | GNUNET_CRYPTO_rsa_private_key_free (denom_priv.rsa_private_key); | ||
168 | GNUNET_CRYPTO_rsa_public_key_free (denom_pub.rsa_public_key); | ||
166 | 169 | ||
167 | struct GNUNET_TIME_Absolute now, past, future, date; | 170 | struct GNUNET_TIME_Absolute now, past, future, date; |
168 | now = GNUNET_TIME_absolute_get (); | 171 | now = GNUNET_TIME_absolute_get (); |