hw/avr/boot: Fix memory leak in avr_load_firmware()

The value returned by qemu_find_file() must be freed.

This fixes Coverity issue CID 1430449, which points out
that the memory returned by qemu_find_file() is leaked.

Fixes: Coverity CID 1430449 (RESOURCE_LEAK)
Fixes: 7dd8f6fd ('hw/avr: Add support for loading ELF/raw binaries')
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Michael Rolnik <[email protected]>
Tested-by: Michael Rolnik <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Message-Id: <[email protected]>
53 jobs for avr-CID-1430449 in 63 minutes and 40 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Containers
passed #647444846
amd64-centos7-container

00:02:33

passed #647444847
amd64-centos8-container

00:02:23

passed #647444848
amd64-debian10-container

00:02:26

passed #647444849
amd64-debian11-container

00:02:11

passed #647444850
amd64-debian9-container

00:02:20

passed #647444853
amd64-fedora-container

00:03:23

passed #647444858
amd64-ubuntu-container

00:02:39

passed #647444856
amd64-ubuntu1804-container

00:02:46

passed #647444857
amd64-ubuntu2004-container

00:02:59

passed #647444852
cris-fedora-cross-container

00:02:19

passed #647444844
docker-edk2

00:01:28

passed #647444845
docker-opensbi

00:01:26

passed #647444855
i386-fedora-cross-container

00:02:27

passed #647444851
xtensa-debian-cross-container

00:02:16

 
  Containers Layer2
passed #647444860
alpha-debian-cross-container

00:02:26

passed #647444867
amd64-debian-container

00:02:46

passed #647444862
amd64-debian-cross-container

00:02:27

passed #647444864
amd64-debian-user-cross-container

00:03:09

passed #647444859
amd64-debian9-mxe-container

00:02:20

passed #647444869
arm64-debian-cross-container

00:02:41

passed #647444873
arm64-test-debian-cross-container

00:02:20

passed #647444875
armel-debian-cross-container

00:02:39

passed #647444877
armhf-debian-cross-container

00:02:37

passed #647444879
hppa-debian-cross-container

00:02:30

passed #647444881
m68k-debian-cross-container

00:02:23

passed #647444886
mips-debian-cross-container

00:02:29

passed #647444882
mips64-debian-cross-container

00:02:28

passed #647444883
mips64el-debian-cross-container

00:02:35

passed #647444888
mipsel-debian-cross-container

00:02:36

passed #647444889
powerpc-debian-cross-container

00:02:22

passed #647444890
ppc64-debian-cross-container

00:02:22

passed #647444891
ppc64el-debian-cross-container

00:02:34

passed #647444892
riscv64-debian-cross-container

00:02:24

passed #647444893
s390x-debian-cross-container

00:02:41

passed #647444894
sh4-debian-cross-container

00:02:26

passed #647444895
sparc64-debian-cross-container

00:02:21

passed #647444896
tricore-debian-cross-container

00:02:20

 
  Containers Layer3
passed #647444897
win32-debian-cross-container

00:02:36

passed #647444898
win64-debian-cross-container

00:02:39

 
  Build
passed #647444907
build-clang

00:42:26

passed #647444903
build-disabled

00:31:15

passed #647444899
build-edk2

00:37:07

passed #647444912
build-fuzzer

00:36:20

passed #647444900
build-opensbi

00:00:59

passed #647444902
build-system-fedora-alt

00:28:26

passed #647444901
build-system-ubuntu-main

00:32:25

passed #647444904
build-tcg-disabled

00:21:17

passed #647444913
build-tci

00:28:08

passed #647444906
build-user

00:37:04

 
  Test
passed #647444918
acceptance-system-fedora-alt

00:15:04

passed #647444916
acceptance-system-ubuntu-main

00:14:32

passed #647444917
check-system-fedora-alt

00:18:18

passed #647444915
check-system-ubuntu-main

00:23:52