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

This fixes a minor memory leak (detected by LeakSanitizer) in git merge #1577

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 23, 2023

  1. Regression test for gitgitgadget#1577

    Signed-off-by: Kevin Backhouse <kevinbackhouse@github.com>
    kevinbackhouse committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f940104 View commit details
    Browse the repository at this point in the history
  2. Fix minor memory leak found by LeakSanitizer.

    The callers of merge_recursive() and merge_ort_recursive() expects the
    commit list passed in as the merge_bases parameter to be fully
    consumed by the function and does not free it when the function
    returns.  In normal cases, the commit list does get consumed, but when
    the function returns early upon encountering an error, it forgets to
    clean it up.
    
    Fix this by freeing the list in the code paths for error returns.
    
    Signed-off-by: Kevin Backhouse <kevinbackhouse@github.com>
    kevinbackhouse committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    353e196 View commit details
    Browse the repository at this point in the history