Detected by Coverity Scanner.
CC: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Gregor Jasny <[email protected]>
---
utils/xc3028-firmware/firmware-tool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/xc3028-firmware/firmware-tool.c
b/utils/xc3028-firmware/firmware-tool.c
index b2e9de4..a7850df 100644
--- a/utils/xc3028-firmware/firmware-tool.c
+++ b/utils/xc3028-firmware/firmware-tool.c
@@ -86,13 +86,13 @@ static struct firmware* alloc_firmware(void) {
static void free_firmware(struct firmware *f) {
free(f->name);
- free(f->desc);
if(f->desc) {
unsigned int i = 0;
for(i = 0; i < f->nr_desc; ++ i) {
free(f->desc[i].data);
}
}
+ free(f->desc);
free(f);
}
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html