[PATCH] bios: hdaaudio: free list items and not list
Colin King
colin.king at canonical.com
Tue May 7 07:41:55 UTC 2013
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;
}
--
1.8.1.2
More information about the fwts-devel
mailing list