Skip to content

Conversation

@VanshAgarwal24036
Copy link
Contributor

gh-144069

Fix a memory leak in _dbm.open() when dbm_open() fails (for example when
attempting to create a database in a non-existent directory).

dbm_open() may allocate internal DBM resources even if it returns NULL.
Ensure that any partially allocated DBM handle is properly closed on
error paths to avoid leaking memory.

Add a regression test exercising dbm.open() on a path with a missing
parent directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant