On Fri, Aug 3, 2018 at 7:47 AM, Stefan Hajnoczi wrote:
> 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
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