aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-22 17:01:53 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-22 17:02:09 +0200
commit6110954931d12e57757624ce1ea3d412db83460c (patch)
tree2f86f73b13e7ea2563554f6076e59a345ba2c209
parent91e31719824ef0607dcb73d9a5c42d8687dca819 (diff)
fix segv in test if DB interaction failed hard
-rw-r--r--src/auditordb/test_auditordb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/auditordb/test_auditordb.c b/src/auditordb/test_auditordb.c
index 3e8b191d7..bc23f1160 100644
--- a/src/auditordb/test_auditordb.c
+++ b/src/auditordb/test_auditordb.c
@@ -107,7 +107,7 @@ run (void *cls)
plugin->create_tables (plugin->cls))
{
result = 77;
- goto drop;
+ goto unload;
}
if (NULL ==
(session = plugin->get_session (plugin->cls)))
@@ -717,10 +717,12 @@ run (void *cls)
result = 0;
drop:
- plugin->rollback (plugin->cls,
- session);
+ if (NULL != session)
+ plugin->rollback (plugin->cls,
+ session);
GNUNET_break (GNUNET_OK ==
plugin->drop_tables (plugin->cls));
+ unload:
TALER_AUDITORDB_plugin_unload (plugin);
plugin = NULL;
}