Skip to content

Standardise in using xmalloc - #1478

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
chggr:standardize-xmalloc
Jan 2, 2026
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
chggr:standardize-xmalloc

Conversation

@chggr

@chggr chggr commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Replaces all instances of raw malloc and strdup with the xmalloc, xnew, and xstrdup wrappers defined in xmalloc.h.

Previously, raw allocations often lacked NULL checks, risking segmentation faults if memory allocation failed. Using the wrappers ensures consistent error handling and safety across the codebase.

@pgaskin
pgaskin self-requested a review December 13, 2025 03:30
@flyingmutant
flyingmutant merged commit 0ec703a into cmus:master Jan 2, 2026
@chggr
chggr deleted the standardize-xmalloc branch January 4, 2026 13:35
@BrewTestBot BrewTestBot mentioned this pull request Oct 28, 2026
1 task done
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