diff options
-rw-r--r-- | block/qcow2-bitmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 3e8735a20d..e8d3bdbd6e 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -487,6 +487,10 @@ static inline void bitmap_directory_to_be(uint8_t *dir, size_t size) static void bitmap_free(Qcow2Bitmap *bm) { + if (bm == NULL) { + return; + } + g_free(bm->name); g_free(bm); } |