Re: [Qemu-devel] [PATCH for 2.10 07/35] qcow2: fix null pointer dereference

2017-07-24 Thread Philippe Mathieu-Daudé
Hi Eric, On 07/24/2017 03:46 PM, Eric Blake wrote: On 07/24/2017 01:27 PM, Philippe Mathieu-Daudé wrote: If find_bitmap_by_name() fails we have bm=NULL and go to the 'fail' label, then call bitmap_free(bm) which does g_free(bm->name) with bm=NULL... Clang's scan-build-5.0 output: block/qcow2-b

Re: [Qemu-devel] [PATCH for 2.10 07/35] qcow2: fix null pointer dereference

2017-07-24 Thread Eric Blake
On 07/24/2017 01:27 PM, Philippe Mathieu-Daudé wrote: > If find_bitmap_by_name() fails we have bm=NULL and go to the 'fail' label, > then > call bitmap_free(bm) which does g_free(bm->name) with bm=NULL... > > Clang's scan-build-5.0 output: > block/qcow2-bitmap.c:492:12: warning: Access to field '

[Qemu-devel] [PATCH for 2.10 07/35] qcow2: fix null pointer dereference

2017-07-24 Thread Philippe Mathieu-Daudé
If find_bitmap_by_name() fails we have bm=NULL and go to the 'fail' label, then call bitmap_free(bm) which does g_free(bm->name) with bm=NULL... Clang's scan-build-5.0 output: block/qcow2-bitmap.c:492:12: warning: Access to field 'name' results in a dereference of a null pointer (loaded from vari