Re: [PATCH v2 10/20] ref-cache: introduce a new type, ref_cache

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

 



On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote:
> +void free_ref_cache(struct ref_cache *cache)
> +{
> +       free_ref_entry(cache->root);
> +       free(cache);
> +}

free(NULL) is no-op (and safe). Maybe we should follow the same
pattern for free_ref_cache(). It's really up to you.
-- 
Duy



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