[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 01/02: incomplete leak fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 01/02: incomplete leak fixes |
Date: |
Sun, 15 Sep 2019 11:20:32 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 7dca6dacb90390e08df104ad983f8477f0af4a5b
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Sep 15 11:18:31 2019 +0200
incomplete leak fixes
---
src/exchangedb/perf_taler_exchangedb_interpreter.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/exchangedb/perf_taler_exchangedb_interpreter.c
b/src/exchangedb/perf_taler_exchangedb_interpreter.c
index 8286966c..b96db493 100644
--- a/src/exchangedb/perf_taler_exchangedb_interpreter.c
+++ b/src/exchangedb/perf_taler_exchangedb_interpreter.c
@@ -898,17 +898,13 @@ cmd_init (struct PERF_TALER_EXCHANGEDB_Cmd cmd[])
static int
cmd_clean (struct PERF_TALER_EXCHANGEDB_Cmd cmd[])
{
- unsigned int i;
-
- for (i = 0; PERF_TALER_EXCHANGEDB_CMD_END != cmd[i].command; i++)
+ for (unsigned int i = 0; PERF_TALER_EXCHANGEDB_CMD_END != cmd[i].command;
i++)
{
switch (cmd[i].command)
{
case PERF_TALER_EXCHANGEDB_CMD_SAVE_ARRAY:
{
- unsigned int j;
-
- for (j = 0; j < cmd[i].details.save_array.nb_saved; j++)
+ for (unsigned int j = 0; j < cmd[i].details.save_array.nb_saved; j++)
{
data_free (&cmd[i].details.save_array.data_saved[j]);
}
@@ -921,7 +917,9 @@ cmd_clean (struct PERF_TALER_EXCHANGEDB_Cmd cmd[])
GNUNET_free (cmd[i].details.load_array.permutation);
cmd[i].details.load_array.permutation = NULL;
break;
-
+ case PERF_TALER_EXCHANGEDB_CMD_CREATE_WITHDRAW:
+ PERF_TALER_EXCHANGEDB_coin_free (cmd[i].exposed.data.coin);
+ break;
default:
break;
}
@@ -1578,7 +1576,10 @@ PERF_TALER_EXCHANGEDB_interpret (struct
TALER_EXCHANGEDB_Plugin *db_plugin,
return ret;
state.session = db_plugin->get_session (db_plugin->cls);
if (NULL == state.session)
+ {
+ cmd_clean (cmd);
return GNUNET_SYSERR;
+ }
GNUNET_assert (NULL != state.session);
ret = interpret (&state);
cmd_clean (cmd);
--
To stop receiving notification emails like this one, please contact
address@hidden.