]> git.ipfire.org Git - thirdparty/coreutils.git/commit
chcon: fix memory leak in error path
authorPádraig Brady <P@draigBrady.com>
Sat, 8 Nov 2025 10:32:14 +0000 (10:32 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 8 Nov 2025 10:41:48 +0000 (10:41 +0000)
commitcc38da00ef98f270e263dfe3188b2035f9b27c8a
tree997546fdee96b9841556b5239187b67a41513365
parentcc88c2a8071c34b801841e3ac50f56ef00ef28d9
chcon: fix memory leak in error path

* src/chcon.c (change_file_context): If compute_context_from_mask fails,
free the previously allocated file_context.
Fixes https://bugs.gnu.org/79780
src/chcon.c