bridge: CockpitDBusCache batch_flush() causes use after free
bridge: CockpitDBusCache batch_flush() causes use after free

This is because other callers will cause batch_unref() on already
freed batch memory.

I believe this is the fix for the assertion failures we've been
seeing like this: assertion failed (batch->refs > 0)

Fixes #2618
Closes #2646
Reviewed-by: Marius Vollmer <bb11c6e942c5cc765df5f04da146b3198127a7a3@redhat.com>

cockpituous/cockpit,xhad/cockpit,larsu/cockpit,denysvitali/cockpit,moraleslazaro/cockpit,jscotka/cockpit,garrett/cockpit,andreasn/cockpit,dperpeet/cockpit,cockpit-project/cockpit,sgallagher/cockpit,mareklibra/cockpit,moolitayer/cockpit,haiyangd/cockpit_view,petervo/cockpit,garrett/cockpit,larskarlitski/cockpit,SotolitoLabs/cockpit,Scribery/cockpit,mvollmer/cockpit,haiyangd/cockpit_view,jscotka/cockpit,sgallagher/cockpit,FireDrunk/cockpit,jscotka/cockpit,sgallagher/cockpit,petervo/cockpit,andreasn/cockpit,arilivigni/cockpit,stefwalter/cockpit,Scribery/cockpit,andreasn/cockpit,cockpit-project/cockpit,matobet/cockpit,cockpit-project/cockpit,matobet/cockpit,moraleslazaro/cockpit,arilivigni/cockpit,larsu/cockpit,moraleslazaro/cockpit,stefwalter/cockpit,michalskrivanek/cockpit,michalskrivanek/cockpit,zigitax/cockpit,larskarlitski/cockpit,moolitayer/cockpit,garrett/cockpit,deryni/cockpit,moraleslazaro/cockpit,zigitax/cockpit,arilivigni/cockpit,vanloswang/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,zigitax/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,larsu/cockpit,mareklibra/cockpit,moolitayer/cockpit,mvollmer/cockpit,denysvitali/cockpit,arilivigni/cockpit,larsu/cockpit,dperpeet/cockpit,michalskrivanek/cockpit,deryni/cockpit,xhad/cockpit,andreasn/cockpit,jscotka/cockpit,xhad/cockpit,petervo/cockpit,SotolitoLabs/cockpit,stefwalter/cockpit,larsu/cockpit,harishanand95/cockpit,FireDrunk/cockpit,matobet/cockpit,martinpitt/cockpit,Armstrong1992/cockpit,xhad/cockpit,vanloswang/cockpit,Scribery/cockpit,larskarlitski/cockpit,deryni/cockpit,zigitax/cockpit,michalskrivanek/cockpit,larskarlitski/cockpit,harishanand95/cockpit,SotolitoLabs/cockpit,mareklibra/cockpit,larsu/cockpit,matobet/cockpit,mareklibra/cockpit,vanloswang/cockpit,harishanand95/cockpit,cockpituous/cockpit,denysvitali/cockpit,FireDrunk/cockpit,SotolitoLabs/cockpit,matobet/cockpit,dperpeet/cockpit,denysvitali/cockpit,matobet/cockpit,moolitayer/cockpit,cockpituous/cockpit,dperpeet/cockpit,deryni/cockpit,arilivigni/cockpit,cockpituous/cockpit,FireDrunk/cockpit,andreasn/cockpit,dperpeet/cockpit,larskarlitski/cockpit,Scribery/cockpit,stefwalter/cockpit,harishanand95/cockpit,mareklibra/cockpit,Armstrong1992/cockpit,zigitax/cockpit,Armstrong1992/cockpit,vanloswang/cockpit,SotolitoLabs/cockpit,michalskrivanek/cockpit,jscotka/cockpit,vanloswang/cockpit,haiyangd/cockpit_view,stefwalter/cockpit,FireDrunk/cockpit,michalskrivanek/cockpit,sgallagher/cockpit,larskarlitski/cockpit,deryni/cockpit,michalskrivanek/cockpit,petervo/cockpit,mareklibra/cockpit,mareklibra/cockpit,xhad/cockpit,harishanand95/cockpit,martinpitt/cockpit,sgallagher/cockpit,cockpituous/cockpit,Scribery/cockpit,mvollmer/cockpit,xhad/cockpit,SotolitoLabs/cockpit,Scribery/cockpit,haiyangd/cockpit_view,arilivigni/cockpit,petervo/cockpit,Armstrong1992/cockpit,arilivigni/cockpit,mvollmer/cockpit,moolitayer/cockpit,vanloswang/cockpit,martinpitt/cockpit,dperpeet/cockpit,garrett/cockpit,denysvitali/cockpit,stefwalter/cockpit,petervo/cockpit,harishanand95/cockpit,deryni/cockpit,vanloswang/cockpit,Armstrong1992/cockpit,martinpitt/cockpit,dperpeet/cockpit,jscotka/cockpit,SotolitoLabs/cockpit,andreasn/cockpit,larskarlitski/cockpit,cockpit-project/cockpit,petervo/cockpit,moraleslazaro/cockpit,sgallagher/cockpit,andreasn/cockpit,cockpituous/cockpit,deryni/cockpit,xhad/cockpit,sgallagher/cockpit,harishanand95/cockpit,cockpit-project/cockpit,Scribery/cockpit,garrett/cockpit,haiyangd/cockpit_view,stefwalter/cockpit