diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index a5077fe7c8..57a8fbf82c 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -332,11 +332,7 @@ char *virBitmapString(virBitmapPtr bitmap) bitmap->map[sz]); } - if (virBufferError(&buf)) { - virBufferFreeAndReset(&buf); - return NULL; - } - + virBufferCheckError(&buf); return virBufferContentAndReset(&buf); }