Hi Mark,

On Mon, May 4, 2026 at 11:55 AM Mark Wielaard <[email protected]> wrote:
>
>         * libebl/eblinitreg_sample.c (ebl_sample_perf_regs_mapping):
>         Return false when calloc fails.
>
> Signed-off-by: Mark Wielaard <[email protected]>

LGTM.

Aaron

> ---
>  libebl/eblinitreg_sample.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libebl/eblinitreg_sample.c b/libebl/eblinitreg_sample.c
> index 2b5a278a72eb..13c24ad27696 100644
> --- a/libebl/eblinitreg_sample.c
> +++ b/libebl/eblinitreg_sample.c
> @@ -112,6 +112,8 @@ ebl_sample_perf_regs_mapping (Ebl *ebl,
>      free (ebl->cached_regs_mapping);
>    ebl->cached_perf_regs_mask = perf_regs_mask;
>    ebl->cached_regs_mapping = (int *)calloc (count, sizeof(int));
> +  if (ebl->cached_regs_mapping == NULL)
> +    return false;
>    ebl->cached_n_regs_mapping = count;
>
>    int j, k; uint64_t bit;
> --
> 2.54.0
>

Reply via email to