Skip to content

Fix: Memory leaks#575

Open
Piloalucard wants to merge 11 commits intoLinearTapeFileSystem:v2.4.8-windows-supportfrom
Piloalucard:fix/memory-leaks
Open

Fix: Memory leaks#575
Piloalucard wants to merge 11 commits intoLinearTapeFileSystem:v2.4.8-windows-supportfrom
Piloalucard:fix/memory-leaks

Conversation

@Piloalucard
Copy link
Member

Summary of changes

This pull request includes following changes or fixes.

  • Fixes memory leak on src/libltfs/fs.c
  • Fixes memory leak on src/libltfs/xml.h by re-defining declare_tracking_arrays implementation. If called and no optional tags are required will use declare_tracking_arrays_no_opt. If called and no tags are required will use declare_tracking_arrays_no_tags
  • Fixes tape_set_attribute_to_cm memory buffer wrong size.
  • Fixes tape_get_attribute_from_cm memory buffer wrong size
  • Deletes arch_strcpy_limited from src/libltfs/arch/ltfs_arch_ops.h
  • Ensures usages for Windows/Linux implementation of arch_strcpy and arch_strncpy

Type of change

Please delete items that are not relevant.

  • Refactoring
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

@Piloalucard Piloalucard changed the base branch from master to v2.4.8-windows-support March 5, 2026 20:35
Copy link
Contributor

@amissael95 amissael95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working in this important change and addressing my comments. Approved!

Copy link
Collaborator

@syaoraang syaoraang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks pretty good, just a few comments.

@Piloalucard Piloalucard requested a review from syaoraang March 12, 2026 20:25
Copy link
Collaborator

@syaoraang syaoraang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, thanks for attending the comments!

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

Successfully merging this pull request may close these issues.

3 participants