fw_cfg patches

Fixes a bug in the recently introduced fw_cfg_add_from_generator().
 
 CI jobs results:
 . https://gitlab.com/philmd/qemu/-/pipelines/191714875
 . https://travis-ci.org/github/philmd/qemu/builds/728288784
 . https://app.shippable.com/github/philmd/qemu/runs/869/1/console
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAl9k0FgACgkQ4+MsLN6t
 wN59Zw//WOo21BmPNeketGRfkFwIT899iUNQmKDYXCEfK4dO6HFtLFl98O96hiUM
 dZazxw2UicIal7mW16feiVVVxhEu5cZjxfRsWn92+rdU0JDtH+dJqBY6XGDcQHIB
 fnX1s3esHj19V7qsFmk8WAh6WiJuw6KhiIgJ1uwUe/ErPA70DRwiO6RZLmH0DMCh
 eqb/Vd79Q9FDVbonBE0mqyOWfEAJfnkgvAt5b6mTmy715HEjsbxTaEhETGzPITD1
 5kARoEfAzndT5Elq4gZAptlhIV0QVOtqgMpRV3yf6tVjezeL5uC9jX16id1RSChF
 1tJ3Z+GBQxXQvFFub7mHf6AQOaSDkT99hpt64uUmKto9WaqLaTz/rEdnWf83a6U1
 6fX1NdaBC1thwBWS1gffKxjGG4hhplBj44jYvmSTf8KOPOXEgKbCozA9KwDh7GEG
 +pvEKsObASJ2JH0ECH+0S5/UmU8RMRJ5sOU2hx+Rz4p/illEUf8YjZjLBYM+eXrt
 LRJbfVEFrf3xPcxKf7fruqEDjz0S8rPS4LkGkOzB50hlDdhAj5f5y/GCWm+ooRuU
 PORF30mnHEZSbDX8E7VjlaOmutEZNJ1vQqqoOyg4kzV/miZ7itULoTLLhepTpxkK
 zCgmkOetabf7212Uz4Ga5AfW7j+GoHHBWwpP/BHbxrMWP3lxHt4=
 =HCb5
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/philmd-gitlab/tags/fw_cfg-20200918' into staging

fw_cfg patches

Fixes a bug in the recently introduced fw_cfg_add_from_generator().

CI jobs results:
. https://gitlab.com/philmd/qemu/-/pipelines/191714875
. https://travis-ci.org/github/philmd/qemu/builds/728288784
. https://app.shippable.com/github/philmd/qemu/runs/869/1/console

# gpg: Signature made Fri 18 Sep 2020 16:20:56 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/fw_cfg-20200918:
  hw/nvram/fw_cfg: fix FWCfgDataGeneratorClass::get_data() consumption

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-09-18 16:34:26 +01:00
commit 053a417781

View File

@ -1056,7 +1056,7 @@ bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename,
return false;
}
size = array->len;
fw_cfg_add_file(s, filename, g_byte_array_free(array, TRUE), size);
fw_cfg_add_file(s, filename, g_byte_array_free(array, FALSE), size);
return true;
}