-+ GList *l = backup_state.bcb_list;
-+ while (l) {
-+ BackupCB *bcb = l->data;
-+ drive_put_ref_bh_schedule(drive_get_by_blockdev(bcb->bs));
-+ g_free(l->data);
-+ l = g_list_next(l);
++ if (backup_state.bcb_list) {
++ GList *l = backup_state.bcb_list;
++ while (l) {
++ BackupCB *bcb = l->data;
++ l = g_list_next(l);
++ drive_put_ref_bh_schedule(drive_get_by_blockdev(bcb->bs));
++ g_free(bcb);
++ }
++ g_list_free(backup_state.bcb_list);
++ backup_state.bcb_list = NULL;