Skip to content

Commit

Permalink
Fix additional memory leak in process_mapfile
Browse files Browse the repository at this point in the history
Additional Coverity detected memory leak fix.

Submitted by:	[email protected]
Reported by:	Coverity
Reviewed by:	cem, emaste
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D26462
  • Loading branch information
vangyzen committed Sep 17, 2020
1 parent edd1bf9 commit acde258
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/libpmc/pmu-events/jevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,8 @@ process_mapfile(FILE *outfp, char *fpath)
/* TODO Deal with lines longer than 16K */
pr_info("%s: Mapfile %s: line %d too long, aborting\n",
prog, fpath, line_num);
free(line);
fclose(mapfp);
return -1;
}
line[strlen(line)-1] = '\0';
Expand Down

0 comments on commit acde258

Please sign in to comment.