Index: lib/libpmc/pmu-events/jevents.c =================================================================== --- lib/libpmc/pmu-events/jevents.c +++ lib/libpmc/pmu-events/jevents.c @@ -850,6 +850,8 @@ out: print_mapping_table_suffix(outfp); + free(line); + fclose(mapfp); return 0; }