Browse Source

don't crash in proxy_invoke_bad_callback()

we need to hold a ref to the proxy store, as after the bad_callback()
it's otherwise likely gone.
wip/unchecked-remove
Oswald Buddenhagen 4 years ago
parent
commit
c82397cf6e
  1. 4
      src/drv_proxy.c

4
src/drv_proxy.c

@ -306,9 +306,11 @@ proxy_set_bad_callback( store_t *gctx, void (*cb)( void *aux ), void *aux )
static void
proxy_invoke_bad_callback( proxy_store_t *ctx )
{
ctx->ref_count++;
debug( "%sCallback enter bad store\n", ctx->label );
ctx->bad_callback( ctx->bad_callback_aux );
debug( "%sCallback leave bad store\n", ctx->label ); \
debug( "%sCallback leave bad store\n", ctx->label );
proxy_store_deref( ctx );
}
//# EXCLUDE alloc_store

Loading…
Cancel
Save