ACK: [PATCH] bios: hdaaudio: free list items and not list
Alex Hung
alex.hung at canonical.com
Wed May 8 02:13:30 UTC 2013
On 05/07/2013 03:41 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity CID #997321: Free of address-of-expression
>
> We should be just free'ing the list items and not the list
> descriptor because this is not on the heap.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/bios/hdaaudio/hdaaudio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bios/hdaaudio/hdaaudio.c b/src/bios/hdaaudio/hdaaudio.c
> index 47fd60e..ad482b6 100644
> --- a/src/bios/hdaaudio/hdaaudio.c
> +++ b/src/bios/hdaaudio/hdaaudio.c
> @@ -44,7 +44,7 @@ static int hda_audio_read_pins(const char *path, const char *file, fwts_list *se
> while (fscanf(fp, "0x%hx 0x%x\n", &pin, &setting) == 2) {
> pin_setting = calloc(1, sizeof(hda_audio_pin_setting));
> if (pin_setting == NULL) {
> - fwts_list_free(settings, free);
> + fwts_list_free_items(settings, free);
> fclose(fp);
> return FWTS_ERROR;
> }
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list