Index: bxl_gram.c =================================================================== --- bxl_gram.c (revision 30622) +++ bxl_gram.c (revision 30623) @@ -644,7 +644,7 @@ break; case 30: #line 164 "../../src_plugins/io_bxl/bxl_gram.y" - { pcb_bxl_padstack_begin(ctx, yyctx->stack.l_mark[0].un.s); /* $2 is taken over */ } + { pcb_bxl_reset(ctx); pcb_bxl_padstack_begin(ctx, yyctx->stack.l_mark[0].un.s); /* $2 is taken over */ } break; case 31: #line 166 "../../src_plugins/io_bxl/bxl_gram.y" Index: bxl_gram.y =================================================================== --- bxl_gram.y (revision 30622) +++ bxl_gram.y (revision 30623) @@ -161,7 +161,7 @@ /*** PadStack ***/ pad_stack: - T_PADSTACK T_QSTR { pcb_bxl_padstack_begin(ctx, $2); /* $2 is taken over */ } + T_PADSTACK T_QSTR { pcb_bxl_reset(ctx); pcb_bxl_padstack_begin(ctx, $2); /* $2 is taken over */ } pstk_attrs nl T_SHAPES ':' T_INTEGER nl { ctx->state.num_shapes = $8; } pad_shapes Index: read.c =================================================================== --- read.c (revision 30622) +++ read.c (revision 30623) @@ -201,6 +201,9 @@ if (ctx->proto_id-1 != i) pcb_message(PCB_MSG_WARNING, "bxl footprint error: failed to insert padstack '%s'\n", ctx->state.proto.name); ctx->state.proto.name = NULL; /* do not free it as it is the hash key */ + + pcb_pstk_proto_free_fields(&ctx->state.proto); + ctx->state.proto.tr.used = 0; } void pcb_bxl_padstack_begin_shape(pcb_bxl_ctx_t *ctx, const char *name)