diff options
Diffstat (limited to 'qapi/qapi-dealloc-visitor.c')
-rw-r--r-- | qapi/qapi-dealloc-visitor.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c index fd6f9fb61c..ed70a0158b 100644 --- a/qapi/qapi-dealloc-visitor.c +++ b/qapi/qapi-dealloc-visitor.c @@ -103,8 +103,12 @@ static void qapi_dealloc_type_anything(Visitor *v, const char *name, } } -static void qapi_dealloc_type_null(Visitor *v, const char *name, Error **errp) +static void qapi_dealloc_type_null(Visitor *v, const char *name, + QNull **obj, Error **errp) { + if (obj) { + QDECREF(*obj); + } } static void qapi_dealloc_free(Visitor *v) |