bug fix - cpu_rapl_device memory leak

Added memory dealocation for cpu_rapl_device to fix memory leak reported
by valgrind.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
bug fix - device list memory leak

Added memory adeallocation for initialized device list, this change
fixes memory leaks reported by valgrind.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
bug fix - memory leak abstract_cpu destructor

Modified destructor to abstract_cpu.cpp to clean up stl vectors.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
bug-fix: memory leak on register_devpower

Modified destructor to deallocate memory allocated by register_devpower.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
event-parse: don't free uninitialized token

When alloc_arg() allocation fails token is free'd in the error
exit path, however, at that point token has not been allocated
which can break free().  This fix avoids the erroneous free of
token on the error exit.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
event-parse: fix common realloc out of memory freeing issue

When realloc fails one must not assume it has free'd the original
allocated memory, so one should free this first before bailing out
on the error exit path. For example, see section 7.20.3.4 of the
C11 standard.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fix a few minor spelling mistakes/typos

Found a few minor spelling mistakes and typos with codespell that
can do with fixing.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
event-parse: fix compilation warning

By default the XSI-compliant strerror_r is being used causing
the warning:

event-parse.c:5121:7: warning: assignment makes pointer from
integer without a cast [enabled by default]
   msg = strerror_r(errnum, buf, buflen);
       ^
Instead, use the GNU-specific strerror_r to avoid this warning.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
cpuid: Enabled support for Intel next generation

Added CPU id to support Intel next generation

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
Merge branch 'memleak'