Re: [PATCH] builtin-clone.c: fix memory leak in cmd_clone()

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

 



Hi,

Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Yup, I'll queue (I won't have time today to work on git it seems) the

Thanks.

> other two patches from you, but I was going to drop this one---unless your
> plan was to make cmd_clone() callable more than once in order to use it in
> say a C rewrite of git submodule or something like that.

The only problem in builtin-clone.c seems to be remove_junk() which is
called from a signal handler or atexit().  cmd_clone() can be changed to
register this function only once.

remove_junk() uses junk_* global variables which are overwritten in each
cmd_clone() call.  Since no concurrent cmd_clone() is allowed (?) and we
only care about the last one, this does not seem to be an issue.

I'll probably send a new patch tomorrow.

Regards,
Ali
--
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]

  Powered by Linux