提交 1cb334ef 编写于 作者: J Jim Meyering

json.c: avoid an unconditional leak from most qemuMonitorJSON* functions

* src/util/json.c (virJSONValueFree): Free the "value" pointer, too.
上级 4cd188d4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* json.c: JSON object parsing/formatting * json.c: JSON object parsing/formatting
* *
* Copyright (C) 2009 Daniel P. Berrange * Copyright (C) 2009 Daniel P. Berrange
* Copyright (C) 2009 Red Hat, Inc. * Copyright (C) 2009-2010 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -82,8 +82,9 @@ void virJSONValueFree(virJSONValuePtr value) ...@@ -82,8 +82,9 @@ void virJSONValueFree(virJSONValuePtr value)
case VIR_JSON_TYPE_NUMBER: case VIR_JSON_TYPE_NUMBER:
VIR_FREE(value->data.number); VIR_FREE(value->data.number);
break; break;
} }
VIR_FREE(value);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册