2017-11-22 06:32:10

by Ravi Bangoria

[permalink] [raw]
Subject: Re: [PATCH v1 3/9] perf util: Reconstruct rblist for supporting per-thread shadow stats


On 11/20/2017 08:13 PM, Jin Yao wrote:
> @@ -76,6 +97,17 @@ static struct rb_node *saved_value_new(struct rblist *rblist __maybe_unused,
> return &nd->rb_node;
> }
>
> +static void saved_value_delete(struct rblist *rblist __maybe_unused,
> + struct rb_node *rb_node)
> +{
> + struct saved_value *v = container_of(rb_node,
> + struct saved_value,
> + rb_node);
> +
> + if (v)
> + free(v);
> +}

Do we really need if(v) ?

Thanks,
Ravi


From 1584731064183450028@xxx Wed Nov 22 02:21:54 +0000 2017
X-GM-THRID: 1584566861527833455
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread