Since there is a check on configbuf through virBufferError(), it is not necessary to check configstr and report OOM again. Signed-off-by: Hongwei Bi <hwbi2008@xxxxxxxxx> --- src/network/bridge_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 8787bdb..ec40e0c 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1312,10 +1312,7 @@ networkRadvdConfContents(virNetworkObjPtr network, char **configstr) virReportOOMError(); goto cleanup; } - if (!(*configstr = virBufferContentAndReset(&configbuf))) { - virReportOOMError(); - goto cleanup; - } + *configstr = virBufferContentAndReset(&configbuf); } ret = 0; -- 1.8.1.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list