power: fix frequency list to handle null buffer
authorDavid Hunt <david.hunt@intel.com>
Mon, 7 Jan 2019 14:39:34 +0000 (14:39 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:41 +0000 (02:40 +0100)
commit2e6ccdb4e0887e881de97fe51a038cacca1aedad
tree31ced4c83624b9cbb7cfc180714d9c9b37997067
parentde394915dfa12628fd55680dadeda521e53ef948
power: fix frequency list to handle null buffer

This patch fixes a segfault in the case where a null buffer is passed
to the following functions:
   power_acpi_cpufreq_freqs()
   power_pstate_cpufreq_freqs()

Fixes: 445c6528b55f ("power: common interface for guest and host")

Signed-off-by: David Hunt <david.hunt@intel.com>
lib/librte_power/power_acpi_cpufreq.c
lib/librte_power/power_pstate_cpufreq.c