Re: [PATCH 7/7] commit-tree: free commit message before exiting

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> This buffer is freed by the C runtime when commit-tree exits moments
> later, but freeing it explicitly should hopefully make this code
> easier to reuse (in addition to making valgrind quieter).

I'd agree this is a change in a good direction because it will reduce
false positives from valgrind.  I do not believe it would make it any
easier to reuse, though.  Read what the code does (e.g. calling
git-config, showing usage or dying on sick arguments, etc.).  So I have to
say that the proposed commit log message advertises a benefit that it does
not bring.

By the way, is there an easy and concise way to tell valgrind to

 (1) treat allocations made in main() that are not freed as non-issues;
     and

 (2) treat functions whose name begin with cmd_ as if they are all their
     own main(), and apply the above special casing to them?

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