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

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

 



Hi,

On Wed, 1 Apr 2009, Ali Gholami Rudi wrote:

> With this patch, cmd_clone() safely frees its xstrdup()-allocated
> memory.  Also junk_work_tree and junk_git_dir (used in remove_junk()
> which is called asynchronously) were changed to use static arrays rather
> than sharing the memory allocated in cmd_clone().

If you want to go down that route, you will have a long way to go: the 
assumption is pretty much in every cmd_() and main() function that 
singletons will be free()d automatically when the process ends.

Ciao,
Dscho

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