Re: [PATCH v4 2/7] git: allow alias-shadowing deprecated builtins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 09, 2025 at 09:45:52PM +0200, kristofferhaugsbakk@xxxxxxxxxxxx wrote:

> +		if (is_deprecated_command(args->v[0]) &&
> +		    alias_lookup(args->v[0])) {
> +			if (!handle_alias(args))
> +				break;
> +			done_alias = 1;
> +			continue;
> +		}

I think this is failing the SANITIZE=leak jobs, because alias_lookup()
returns an allocated string with the alias. You need to capture and free
it, or introduce an alias_exists() wrapper to do so.

There might also be a way to do it just by calling handle_alias() and
checking its return value (it seems to indicate whether an alias was
found, but I didn't look through the whole function carefully, or think
about the implications of how the done_alias flag works).

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux