mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add virBufferFreeAndReset() and replace free()
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
This commit is contained in:
@@ -3800,7 +3800,7 @@ static int buildPoolXML(const vshCmd *cmd, char **retname, char **xml) {
|
||||
return TRUE;
|
||||
|
||||
cleanup:
|
||||
free(virBufferContentAndReset(&buf));
|
||||
virBufferFreeAndReset(&buf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -4663,7 +4663,7 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
|
||||
}
|
||||
|
||||
cleanup:
|
||||
free(virBufferContentAndReset(&buf));
|
||||
virBufferFreeAndReset(&buf);
|
||||
virStoragePoolFree(pool);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user