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

rig.c: Cleanup read_binary_block() to always close fd. #452

Closed
wants to merge 1 commit into from

Conversation

schwehr
Copy link
Collaborator

@schwehr schwehr commented Sep 28, 2023

  • Combine definition and assignment of variables
  • Convert exit(1) to exit(EXIT_FAILURE)
  • Add a const to readlen
CID 1546508 (#1 of 1): Resource leak (RESOURCE_LEAK)
7. leaked_storage: Variable fd going out of scope leaks the storage it points to.

- Combine definition and assignment of variables
- Convert `exit(1)` to `exit(EXIT_FAILURE)`
- Add a `const` to `readlen`

```
CID 1546508 (HDFGroup#1 of 1): Resource leak (RESOURCE_LEAK)
7. leaked_storage: Variable fd going out of scope leaks the storage it points to.
```
@vchoi-hdfgroup vchoi-hdfgroup added Component - Testing Test code, GitHub workflows Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. labels Sep 29, 2023
@schwehr
Copy link
Collaborator Author

schwehr commented Sep 29, 2023

As discussed out-of-band, this PR does not match the style the HDF4 team wants, so I'm closing the PR. Feel free to rewrite this fix to the HDF4/HDF5 style if you'd like.

@schwehr schwehr closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Testing Test code, GitHub workflows Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants