commit c82397cf6e6c3c89b3b5bce6836bf17208abae70
Author: Oswald Buddenhagen <[email protected]>
Date: Mon Aug 3 12:39:33 2020 +0200
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.
src/drv_proxy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/drv_proxy.c b/src/drv_proxy.c
index 6a62f22..1188f1f 100644
--- a/src/drv_proxy.c
+++ b/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
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel