Re: [PATCH] perf tests: Do not use sizeof on pointer type
From: Arnaldo Carvalho de Melo
Date: Thu Apr 28 2016 - 14:36:14 EST
Em Thu, Apr 28, 2016 at 10:16:57PM +0530, Vaishali Thakkar escreveu:
> Using sizeof on a malloced pointer type will return the wordsize
> which can often cause one to allocate a buffer much smaller than
> it is needed. So, here do not use sizeof on pointer type.
>
> Note that this has no effect on runtime because 'dsos' is a
> pointer to a pointer.
>
> Problem found using Coccinelle.
Thanks, applied.
- Arnaldo