spapr: initialize local Error pointer
PATCH 1/1 spapr: initialize local Error pointer
This fixes a crash in the target QEMU during migration.
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id) section_hdr =qemu_get_be32 (f);if (section_hdr) { -Error *local_err; +Error *local_err =NULL ;/* First section gives the htab size */ spapr_reallocate_hpt (spapr, section_hdr, &local_err);
Quoted 3 lines · Greg Kurz
This fixes a crash in the target QEMU during migration.
Fixes c5f54f3e31bf693f70a98d4d73ea5dbe05689857
Suggest to word that as "Broken in commit c5f54f3."
Quoted 10 lines
Signed-off-by Greg Kurz <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +0
-0
hw/ppc/spapr.c static int htab_load(QEMUFile *f, void *opaque, int version_id) · line 1534
Quoted 8 lines
hw/ppc/spapr.c +1
-1@@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id) section_hdr =qemu_get_be32 (f);if (section_hdr) { -Error *local_err; +Error *local_err =NULL ;/* First section gives the htab size */ spapr_reallocate_hpt (spapr, section_hdr, &local_err);
Easy mistake to make (I've made it myself). I wish I had the time to figure out how to make Coccinelle catch it.
Quoted 8 lines · On Thu, 18 Feb 2016 16:02:53 +0100 Markus Armbruster <[email protected]> wrote:
Quoted 3 lines · Greg Kurz
This fixes a crash in the target QEMU during migration.
Fixes c5f54f3e31bf693f70a98d4d73ea5dbe05689857Suggest to word that as "Broken in commit c5f54f3."
This is more explicit indeed. I'll do that for future patches.
Thanks !
Quoted 24 lines
Quoted 10 lines
Signed-off-by Greg Kurz <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +0
-0hw/ppc/spapr.c static int htab_load(QEMUFile *f, void *opaque, int version_id) · line 1534
Quoted 8 lines
hw/ppc/spapr.c +1
-1@@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id) section_hdr =qemu_get_be32 (f);if (section_hdr) { -Error *local_err; +Error *local_err =NULL ;/* First section gives the htab size */ spapr_reallocate_hpt (spapr, section_hdr, &local_err);Easy mistake to make (I've made it myself). I wish I had the time to figure out how to make Coccinelle catch it.
Reviewed-by Markus Armbruster <[email protected]>
David Gibson
AppliedQuoted 24 lines · Markus Armbruster
Quoted 3 lines · Greg Kurz
This fixes a crash in the target QEMU during migration.
Fixes c5f54f3e31bf693f70a98d4d73ea5dbe05689857Suggest to word that as "Broken in commit c5f54f3."
Quoted 16 lines
Signed-off-by Greg Kurz <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -1528,7 +1528,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id) section_hdr =qemu_get_be32 (f);if (section_hdr) { -Error *local_err; +Error *local_err =NULL ;
Quoted 7 lines
hw/ppc/spapr.c static int htab_load(QEMUFile *f, void *opaque, int version_id) · line 1534
Quoted 2 lines
hw/ppc/spapr.c +0
-0/* First section gives the htab size */ spapr_reallocate_hpt (spapr, section_hdr, &local_err);Easy mistake to make (I've made it myself). I wish I had the time to figure out how to make Coccinelle catch it.
Reviewed-by Markus Armbruster <[email protected]>
Applied to ppc-for-2.6 with Markus's suggested rewording. Thanks.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson