]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
spapr: fix leak in h_client_architecture_support()
authorGreg Kurz <groug@kaod.org>
Tue, 12 Jun 2018 17:01:26 +0000 (19:01 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 16 Jun 2018 06:32:33 +0000 (16:32 +1000)
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>
hw/ppc/spapr_hcall.c

index 022f6d8101822e937988d24ec7d5521e7feefdf9..8b9a4b577fbf39cd0ceb70be85357696bbe7a2a2 100644 (file)
@@ -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;
         }
     }