Re: [PATCH 3/3] clone: Free a few paths

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Thanks.  The commit message should probably mention that this is for
> the sake of valgrind rather a true memory leak, since the memory is
> freed by _exit at the appropriate time already.

Or perhaps you are planning to split larger later half of cmd_clone() into
a helper function, so that other people can call it after doing their own
command line processing.

> The patch itself seems sane, since the performance effect should be
> negligible.

Perhaps and yes.

I would have preferred a patch to free path and dir without doing anything
else, as path is coming from get_repo_path() that always return a string
on heap, and dir comes either directly from xstrdup() or guess_dir_name()
that gives strbuf_detach() or xstrndup() result to us, and they are
clearly leaking and are safely freed, though.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]