app/procinfo: fix xstats by ID on 32-bit
authorMichal Jastrzebski <michalx.k.jastrzebski@intel.com>
Tue, 9 May 2017 05:23:29 +0000 (07:23 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 10 May 2017 16:49:59 +0000 (18:49 +0200)
commit08dd403dbdd4c38b59904b8930b703505eedefd8
tree3714572f0d541f972ea01e7de5b69185889e7f1b
parentb6b63dfd0f71c5ebf43094282fd97e1f350c0b6e
app/procinfo: 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: 144523, 144521
Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")

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