-/* $Id: zebraapi.c,v 1.204 2006-03-23 09:15:25 adam Exp $
+/* $Id: zebraapi.c,v 1.205 2006-03-25 15:33:29 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
reg->dh = data1_createx (DATA1_FLAG_XML);
if (!reg->dh)
{
+ xfree(reg->name);
xfree(reg);
return 0;
}
if (!reg->bfs)
{
data1_destroy(reg->dh);
+ xfree(reg->name);
xfree(reg);
return 0;
}
{
bfs_destroy(reg->bfs);
data1_destroy(reg->dh);
+ xfree(reg->name);
xfree(reg);
return 0;
}
data1_set_tabroot (reg->dh, reg_path);
reg->recTypes = recTypes_init (zs->record_classes, reg->dh);
- if ((reg->zebra_maps = zebra_maps_open (res, reg_path)) == 0) {
- /* ### Do we need to destroy reg->recTypes? */
+ if ((reg->zebra_maps = zebra_maps_open (res, reg_path)) == 0)
+ {
+ recTypes_destroy(reg->recTypes);
bfs_destroy(reg->bfs);
data1_destroy(reg->dh);
+ xfree(reg->name);
xfree(reg);
return 0;
}
yaz_log (YLOG_WARN, "previous transaction didn't reach commit");
bf_commitClean (bfs, rval);
bfs_destroy (bfs);
- }
+ }
else
{
yaz_log (YLOG_WARN, "your previous transaction didn't finish");