diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-23 16:52:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-23 16:52:13 +0200 |
commit | 265fc74b656910dda559f410aa140c57de261cc9 (patch) | |
tree | 03118e51436ec50e6322cb7742908f6569ed0c01 /src/exchangedb | |
parent | f43bac58947fd208bfb0cc5d6c6c1e4ba34d10ff (diff) | |
download | exchange-265fc74b656910dda559f410aa140c57de261cc9.tar.xz |
check return values, fix use of uninit memory on certain error handling paths
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/test_exchangedb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 828659ba3..9941494a9 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -491,6 +491,7 @@ test_melting (struct TALER_EXCHANGEDB_Session *session) int ret; ret = GNUNET_SYSERR; + memset (ev_sigs, 0, sizeof (ev_sigs)); RND_BLK (&refresh_session); RND_BLK (&session_hash); dkp = NULL; @@ -672,7 +673,8 @@ test_melting (struct TALER_EXCHANGEDB_Session *session) ret = GNUNET_OK; drop: for (cnt=0; cnt < MELT_NEW_COINS; cnt++) - GNUNET_CRYPTO_rsa_signature_free (ev_sigs[cnt].rsa_signature); + if (NULL != ev_sigs[cnt].rsa_signature) + GNUNET_CRYPTO_rsa_signature_free (ev_sigs[cnt].rsa_signature); if (NULL != commit_coins) { plugin->free_refresh_commit_coins (plugin->cls, |