Re: [PATCH] Allocate msg only after fatal checks to avoid leaks

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

 



Alex via GitGitGadget <gitgitgadget@xxxxxxxxx> writes:
> 
> From: jinyaoguo <guo846@xxxxxxxxxx>
> 
> In parse_reuse_arg, we previously called xmalloc and strbuf_init
> before resolving the ref and reading the object, leading to a
> leaked msg on die() paths. This change moves the allocation of

A memory leak on the die() path shouldn't be considered a real leak,
right? Since the OS will clean up all memory once the process
terminates, explicitly freeing msg isn't necessary in this case.

Lidong




[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