aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2009-12-10 00:00:50 +0100
committerMatthias Bolte <matthias.bolte@googlemail.com>2009-12-10 00:00:50 +0100
commit1b9d0744937a2f44b88577408f9eb9a879c00881 (patch)
treea6c583d89c3ec14fd8e55aa09a8b196c563b355c /docs/hacking.html.in
parentPlumb domain description tag in xend backend (diff)
downloadlibvirt-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.in7
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(&amp;buf, "&lt;domain&gt;\n");
- virBufferVSprint(&amp;buf, " &lt;memory>%d&lt;/memory&gt;\n", memory);
+ virBufferVSprint(&amp;buf, " &lt;memory&gt;%d&lt;/memory&gt;\n", memory);
...
virBufferAddLit(&amp;buf, "&lt;/domain&gt;\n");
- ....
+ ...
if (virBufferError(&amp;buf)) {
- __virRaiseError(...);
+ virBufferFreeAndReset(&amp;buf);
+ virReportOOMError(...);
return NULL;
}