Index: src/plugins/target_pcb/target_pcb.c =================================================================== --- src/plugins/target_pcb/target_pcb.c (revision 10305) +++ src/plugins/target_pcb/target_pcb.c (revision 10306) @@ -191,6 +191,7 @@ static int on_unload(fgw_obj_t *obj) { target_pcb_ctx_t *ctx = obj->script_data; + sch_trgt_ctx_uninit(&ctx->trgt); free(ctx); return 0; }