diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2018-08-16 14:05:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-08-16 14:05:28 +0100 |
commit | e7f59933548097dbb2272c49f2e0a4ece92697ff (patch) | |
tree | 95086f59e1cd56e347a81e863c4c4e8507c43b98 /hw/microblaze/petalogix_ml605_mmu.c | |
parent | 191776b96a381b5d2b8d3f90c1c02b3e4779e5f7 (diff) |
loader: extract rom_free() function
The next patch will need to free a rom. There is already code to do
this in rom_add_file().
Note that rom_add_file() uses:
rom = g_malloc0(sizeof(*rom));
...
if (rom->fw_dir) {
g_free(rom->fw_dir);
g_free(rom->fw_file);
}
The conditional is unnecessary since g_free(NULL) is a no-op.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180814162739.11814-4-stefanha@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/microblaze/petalogix_ml605_mmu.c')
0 files changed, 0 insertions, 0 deletions