Skip to content
Commit ca7ce82a authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Arnaldo Carvalho de Melo
Browse files

perf tests: Do not use sizeof on pointer type



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.

Signed-off-by: default avatarVaishali Thakkar <vaishali.thakkar@oracle.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1461862017-23358-1-git-send-email-vaishali.thakkar@oracle.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a30e6259
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment