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

fix(dracut-install): release memory allocated for regular expressions #2573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 28, 2023

  1. fix(dracut-install): release memory allocated for regular expressions

    Use `regfree` to free memory allocated by `regcomp`. Quoting [1]:
    
    "If the preg argument to regexec() or regfree() is not a compiled regular
    expression returned by regcomp(), the result is undefined."
    
    Therefore, `regfree` must only be called if `regcomp` succeeded.
    
    [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.html
    aafeijoo-suse committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    26a93a9 View commit details
    Browse the repository at this point in the history