Free Memalign

The `memalign` function may not check that the alignment argument is correct. Calling free (on non Linux-based systems) may fail and in certain circumstances this failure may be exploitable. This function has been deprecated in favor of `posix_memalign`. For more information please see: https://linux.die.net/man/3/memalign

IndexedPublic repositoryLowMedium confidenceVerifiedGPL-2.0-onlyC
greprules fetch gitlab-sast-c-free-rule-memalign --engine opengrep

Description

The `memalign` function may not check that the alignment argument is correct. Calling free (on non Linux-based systems) may fail and in certain circumstances this failure may be exploitable. This function has been deprecated in favor of `posix_memalign`. For more information please see: https://linux.die.net/man/3/memalign