Commit ce05fa0f authored by Greg Kurz's avatar Greg Kurz Committed by David Gibson
Browse files

spapr: Fix memory leak in h_client_architecture_support()



This is the only error path that needs to free the previously allocated
ov1.

Reported-by: Coverity (CID 1421924)
Fixes: cbd0d7f3 "spapr: Fail CAS if option vector table cannot be parsed"
Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
Message-Id: <158481206205.336182.16106097429336044843.stgit@bahia.lan>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
parent feb39b62
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1726,6 +1726,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
    }
    ov5_guest = spapr_ovec_parse_vector(ov_table, 5);
    if (!ov5_guest) {
        spapr_ovec_cleanup(ov1_guest);
        warn_report("guest didn't provide option vector 5");
        return H_PARAMETER;
    }