On Sun, Jun 11, 2023 at 08:50:16PM +0200, Rubén Justo wrote: > Actually, the string we're strdup()'ing is from the struct branch > returned by get_branch(). Which, in turn, retrieves the string from the > global "struct repository". This makes perfectly valid to use the > string throughout the entire execution of create_branch(). There is no > need to duplicate it. > > Let's fix the leak, removing the strdup(). Yep, good reasoning. I agree this is a good way to fix the leak. -Peff