int freelist_size;
struct vacuum_data *vdata;
- freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb);
- if (freelist_size == -1) {
- DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for '%s'\n", name));
- return -1;
- }
-
vdata = talloc_zero(mem_ctx, struct vacuum_data);
if (vdata == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
DEBUG(DEBUG_ERR,(__location__ " Failed to vacuum '%s'\n", name));
}
+ freelist_size = tdb_freelist_size(ctdb_db->ltdb->tdb);
+ if (freelist_size == -1) {
+ DEBUG(DEBUG_ERR,(__location__ " Failed to get freelist size for '%s'\n", name));
+ talloc_free(vdata);
+ return -1;
+ }
+
/*
* decide if a repack is necessary
*/