diff options
author | Matthias Bolte <matthias.bolte@googlemail.com> | 2009-12-10 00:00:50 +0100 |
---|---|---|
committer | Matthias Bolte <matthias.bolte@googlemail.com> | 2009-12-10 00:00:50 +0100 |
commit | 1b9d0744937a2f44b88577408f9eb9a879c00881 (patch) | |
tree | a6c583d89c3ec14fd8e55aa09a8b196c563b355c /docs/hacking.html.in | |
parent | Plumb domain description tag in xend backend (diff) | |
download | libvirt-1b9d0744937a2f44b88577408f9eb9a879c00881.tar.gz libvirt-1b9d0744937a2f44b88577408f9eb9a879c00881.tar.bz2 libvirt-1b9d0744937a2f44b88577408f9eb9a879c00881.zip |
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.
Diffstat (limited to 'docs/hacking.html.in')
-rw-r--r-- | docs/hacking.html.in | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/hacking.html.in b/docs/hacking.html.in index 94b7238e7..af6341118 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@ -306,14 +306,15 @@ ... virBufferAddLit(&buf, "<domain>\n"); - virBufferVSprint(&buf, " <memory>%d</memory>\n", memory); + virBufferVSprint(&buf, " <memory>%d</memory>\n", memory); ... virBufferAddLit(&buf, "</domain>\n"); - .... + ... if (virBufferError(&buf)) { - __virRaiseError(...); + virBufferFreeAndReset(&buf); + virReportOOMError(...); return NULL; } |