ACK: [PATCH] cpu: nx: free fwts_nx_cpuinfo on error

Alex Hung alex.hung at canonical.com
Tue May 7 03:41:36 UTC 2013


On 05/07/2013 06:09 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity CID #997349, Resource leak.
>
> Need to free fwts_nx_cpuinfo before we return.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/cpu/nx/nx.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/cpu/nx/nx.c b/src/cpu/nx/nx.c
> index 66ff2b9..9cf1da9 100644
> --- a/src/cpu/nx/nx.c
> +++ b/src/cpu/nx/nx.c
> @@ -153,6 +153,7 @@ static int nx_test3(fwts_framework *fw)
>   		}
>   		if (fwts_cpu_readmsr(i, 0x1a0, &val) != FWTS_OK) {
>   			fwts_log_error(fw, "Cannot read msr 0x1a0 on CPU%d", i);
> +			fwts_cpu_free_info(fwts_nx_cpuinfo);
>   			return FWTS_ERROR;
>   		}
>   		if (i == 0) {
>
Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list