aboutsummaryrefslogtreecommitdiff
path: root/include/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-01-25 14:26:35 +0100
committerMarkus Armbruster <armbru@redhat.com>2021-03-05 15:40:42 +0100
commitd71a243220db1e6bc04425b5988b8a9bc8523345 (patch)
tree966fe60a81ad0e4fab34bf992b6372222e263e21 /include/qapi
parentfe352f5c0056b4d21ae033ec49acc0bce9897e53 (diff)
downloadqemu-d71a243220db1e6bc04425b5988b8a9bc8523345.zip
qemu-d71a243220db1e6bc04425b5988b8a9bc8523345.tar.gz
qemu-d71a243220db1e6bc04425b5988b8a9bc8523345.tar.bz2
error: Fix "Converting to ERRP_GUARD()" doc on "valid at return"
Setting errp = NULL is wrong: the automatic error propagation still propagates the dangling pointer _auto_errp_prop.local_err. We need to set *errp = NULL to clear the dangling pointer. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210125132635.1253219-1-armbru@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'include/qapi')
-rw-r--r--include/qapi/error.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qapi/error.h b/include/qapi/error.h
index eaa05c4..4a9260b 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -235,7 +235,7 @@
* error_propagate_prepend(errp, *errp, ...) by error_prepend(errp, ...)
*
* 4. Ensure @errp is valid at return: when you destroy *errp, set
- * errp = NULL.
+ * *errp = NULL.
*
* Example:
*