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:
Matthias Bolte
2009-12-10 00:00:50 +01:00
parent 723bfda1ce
commit 1b9d074493
41 changed files with 201 additions and 212 deletions

View File

@@ -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;
}