2021-12-30 03:05:06

by Ryan Cai

[permalink] [raw]
Subject: [Resource Leak] Missing closing files

Dear Kernel maintainers,
 
           In linux/drivers/zorro/gen-devlist.c, the file opened at Line 39 may not closed when going to Line 65. 
 
          I think, return 1 at Line 65 should be goto error. Should it be a bug? I can send a patch.
 
Location: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/drivers/zorro/gen-devlist.c#L39-L65
 
 
 
Best,
Ryan
 





2021-12-30 06:57:58

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [Resource Leak] Missing closing files

On Thu, Dec 30, 2021 at 11:04:58AM +0800, Ryan Cai wrote:
> Dear Kernel maintainers,
> ?
> ?????????? In?linux/drivers/zorro/gen-devlist.c, the file opened at Line 39 may not closed when going to Line 65.?
> ?
> ????????? I think, return 1 at Line 65 should be goto error. Should it be a bug? I can send a patch.
> ?
> Location:?https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/drivers/zorro/gen-devlist.c#L39-L65

Do you use this program / file?

If so, and you can duplicate the problem, sure, send a patch after
testing it.

thanks,

greg k-h