#20 lnewusers leaks a file descriptor
Closed 2 years ago by thalman. Opened 5 years ago by jhrozek.

lnewuser first opens a fd:
84 >-------/ Open the file we're going to look at. /
85 >-------if (file != NULL) {
86 >------->-------fp = fopen(file, "r");
87 >------->-------if (fp == NULL) {
88 >------->------->-------fprintf(stderr, _("Error opening `%s': %s.\n"),
89 >------->------->------->-------file, strerror(errno));
90 >------->------->-------return 2;
91 >------->-------}
92 >-------} else {
93 >------->-------fp = stdin;
94 >-------}
95

but never closes it. It's really not a big deal since it's a short-lived utility, but it trips up static analyzers.


Metadata Update from @jhrozek:
- Issue assigned to jhrozek

5 years ago

Closing the issue. The leak is there but it is not causing any problems. No developments here for years.

Metadata Update from @thalman:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata