Skip to content
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

Coverity: RESOURCE_LEAK #5053

Open
jmarrero opened this issue Aug 16, 2024 · 0 comments
Open

Coverity: RESOURCE_LEAK #5053

jmarrero opened this issue Aug 16, 2024 · 0 comments

Comments

@jmarrero
Copy link
Member

Describe the bug

RESOURCE_LEAK found by Coverity downstream.

1. Defect type: RESOURCE_LEAK
5. rpm-ostree-2024.7/src/app/rpmostree-compose-builtin-tree.cxx:1382:7: open_arg: "glnx_mkdtempat" opens handle stored into "workdir_tmp.fd".
12. rpm-ostree-2024.7/src/app/rpmostree-compose-builtin-tree.cxx:1401:3: leaked_handle: Variable "workdir_tmp" going out of scope leaks handle "workdir_tmp.fd".
#  1399|                                           error))
#  1400|       return FALSE;
#  1401|->   return TRUE;
#  1402|   }
#  1403|   
2. Defect type: RESOURCE_LEAK
5. rpm-ostree-2024.7/src/app/rpmostree-compose-builtin-tree.cxx:1382:7: open_arg: "glnx_mkdtempat" opens handle stored into "workdir_tmp.fd".
12. rpm-ostree-2024.7/src/app/rpmostree-compose-builtin-tree.cxx:1400:5: leaked_handle: Variable "workdir_tmp" going out of scope leaks handle "workdir_tmp.fd".
#  1398|     if (!rpmostreecxx::postprocess_final (rootfs_dfd, **treefile_rs, opt_unified_core, cancellable,
#  1399|                                           error))
#  1400|->     return FALSE;
#  1401|     return TRUE;
#  1402|   }

Reproduction steps

Run coverity against latest release.

Expected behavior

No RESOURCE_LEAK on scans.

Actual behavior

Possible RESOURCE_LEAK

System details

v2024.7 on stream 10

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant