ethdev: fix xstats by ID on 32-bit
authorMichal Jastrzebski <michalx.k.jastrzebski@intel.com>
Tue, 9 May 2017 05:22:13 +0000 (07:22 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 10 May 2017 14:35:16 +0000 (16:35 +0200)
commit881acd6ed6138b7be6d66cff5f02cb3b917d1cb8
tree5554aa51d4d3c04c2c62d62ffdcdf9ad68974e8e
parent70361cb13dea6889a3fbee9626266092cfe8844c
ethdev: fix xstats by ID on 32-bit

Coverity reported that an argument for sizeof was used improperly.
We should allocate memory for value size that pointer points to,
instead of pointer size itself.

Coverity issue: 144522
Fixes: 79c913a42f0e ("ethdev: retrieve xstats by ID")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
lib/librte_ether/rte_ethdev.c