Skip to content

Sane leaks filedescriptors #93

@emdete

Description

@emdete

the init/exit sequence is not cleaning up all resources. this short sequence shows the case:

from sane import init, get_devices, exit as deinit

for _ in range(99):
	init()
	d = get_devices()
	with open("/etc/hosts") as f:
		print(f.fileno())
	deinit()

as you can see the fd will increase (by 78 in my case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions