Skip to content

CA-409648: fix some resource leaks #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion control/tap-ctl-allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ tap_ctl_allocate_minor(int *minor, char **minor_name)
if (err == -1) {
err = -errno;
EPRINTF("Failed to lock runtime directory %d\n", errno);
return err;
goto out;
}

for (id=0; id<MAX_ID; id++) {
Expand Down
2 changes: 1 addition & 1 deletion control/tap-ctl-free.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ tap_ctl_free(const int minor)
if (err == -1) {
err = -errno;
EPRINTF("Failed to lock runtime directory %d\n", errno);
return err;
goto out;
}

err = asprintf(&path, "%s/tapdisk-%d", BLKTAP2_NP_RUN_DIR, minor);
Expand Down
2 changes: 2 additions & 0 deletions drivers/tapdisk-vbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ open_vbd_marker(int id)
goto out;
}

free(path);

return fid;

out:
Expand Down