Index: diag.c =================================================================== --- diag.c (revision 30819) +++ diag.c (revision 30820) @@ -521,7 +521,7 @@ /* print exrtas */ if (want_bbox || want_origin) { pcb_buffer_clear(PCB, &SCRATCH); - if (!pcb_buffer_load_footprint(&SCRATCH, fpn, NULL)) { + if (!pcb_buffer_load_footprint(&SCRATCH, fctx.filename, NULL)) { PCB_ACT_IRES(1); return 0; } @@ -535,6 +535,7 @@ PCB_ACT_IRES(0); } else { + pcb_fp_fclose(f, &fctx); printf(DLF_PREFIX "error file not found\n"); PCB_ACT_IRES(1); }