On Fri, Nov 17, 2023 at 09:16:06PM +0100, Kamil Duljas wrote: > adata->fw_code_bin = kasprintf(GFP_KERNEL, "%s/sof-%s-code.bin", > - plat_data->fw_filename_prefix, > - chip->name); > + plat_data->fw_filename_prefix, > + chip->name); Plese don't include spurious indentation changes like this, it just makes the diff much harder to read. > + if (!adata->fw_code_bin) > + return -ENOMEM; > adata->fw_data_bin = kasprintf(GFP_KERNEL, "%s/sof-%s-data.bin", > - plat_data->fw_filename_prefix, > - chip->name); > + plat_data->fw_filename_prefix, > + chip->name); > + if (!adata->fw_data_bin) > + return -ENOMEM; This now leaks the code binary...
Attachment:
signature.asc
Description: PGP signature
- References:
- [PATCH] ASoC: SOF: acp: Add prevent against NULL
- From: Kamil Duljas
- [PATCH] ASoC: SOF: acp: Add prevent against NULL
- Prev by Date: Re: [PATCH v2] ASoC: hdac_hda: Conditionally register dais for HDMI and Analog
- Next by Date: Re: [PATCH 5/5] ASoC: codecs: Add WCD939x Codec driver
- Previous by thread: [PATCH] ASoC: SOF: acp: Add prevent against NULL
- Next by thread: [PATCH 00/34] biops: add atomig find_bit() operations
- Index(es):