]> xenbits.xensource.com Git - xen.git/commitdiff
libxl_json: remove extra "break"
authorWei Liu <wei.liu2@citrix.com>
Wed, 9 Apr 2014 13:29:13 +0000 (14:29 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 22 May 2014 15:48:34 +0000 (16:48 +0100)
... otherwise JSON array elements are not freed and memory is leaked.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 3eb54a2fdbc216b39dc2c0a86f11a32d4c838269)
(cherry picked from commit d6eff6fcc05f7167e5b2232d3bc60047fffb8fc4)
(cherry picked from commit a14bb4db517ca076ad7d785be52d4bd7a6df6de9)

tools/libxl/libxl_json.c

index 08106306a16bd0bd13c6d49cbc30d414e9bf3e0d..cd036abbd7e4fcc3bc18b97b5b370a0e2c6a7150 100644 (file)
@@ -300,7 +300,6 @@ void libxl__json_object_free(libxl__gc *gc, libxl__json_object *obj)
     }
     case JSON_ARRAY: {
         libxl__json_object *node = NULL;
-        break;
 
         for (index = 0; index < obj->u.array->count; index++) {
             if (flexarray_get(obj->u.array, index, (void**)&node) != 0)