Skip to content

Commit

Permalink
spapr: fix leak in h_client_architecture_support()
Browse files Browse the repository at this point in the history
If the negotiated compat mode can't be set, but raw mode is supported,
we decide to ignore the error. An so, we should free it to prevent a
memory leak.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
  • Loading branch information
gkurz authored and dgibson committed Jun 16, 2018
1 parent e493786 commit 2c9dfda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/ppc/spapr_hcall.c
Expand Up @@ -1547,6 +1547,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
error_report_err(local_err);
return H_HARDWARE;
}
error_free(local_err);
local_err = NULL;
}
}
Expand Down

0 comments on commit 2c9dfda

Please sign in to comment.