From: Junio C Hamano Date: Tue, 08 Jan 2019 23:39:28 GMT Subject: Re: [PATCH v2 1/2] list-objects-filter: teach tree:# how to handle >0 Message-ID: In-Reply-To: <20190108015631.22727-1-jonathantanmy@google.com> Jonathan Tan writes: >> +static void filter_trees_free(void *filter_data) { >> + struct filter_trees_depth_data* d = filter_data; >> + oidmap_free(&d->seen_at_depth, 1); >> + free(d); >> +} > > Check for NULL-ness of filter_data too, to match the usual behavior of > free functions. Also, the asterisk sticks to the variable, not type, i.e. struct filter_trees_depth_data *d = filter_data;