libxl_json: remove extra "break"
PATCH 1/1 libxl_json: remove extra "break"
... otherwise JSON array elements are not freed and memory is leaked.
--- tools/libxl/libxl_json.c | 1 - 1 file changed, 1 deletion(-)
tools/libxl/libxl_json.c +0 -1
@@ -285,7 +285,6 @@ void libxl__json_object_free(libxl__gc *gc, libxl__json_object *obj) }case JSON_ARRAY : {libxl__json_object *node =NULL ; -break ;for (idx =0 ; idx < obj->u.array->count; idx++) {if (flexarray_get (obj->u.array, idx, (void **)&node) !=0 )
Signature · 1 line
1.7.10.4
Quoted 1 line · Wei Liu
... otherwise JSON array elements are not freed and memory is leaked.
How exciting!
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
I assume this isn't a recent issue so this should be a candidate for backporting.
Quoted 16 lines
--- tools/libxl/libxl_json.c | 1 - 1 file changed, 1 deletion(-)tools/libxl/libxl_json.c +0
-1@@ -285,7 +285,6 @@ void libxl__json_object_free(libxl__gc *gc, libxl__json_object *obj) }case JSON_ARRAY : {libxl__json_object *node =NULL ; -break ;for (idx =0 ; idx < obj->u.array->count; idx++) {if (flexarray_get (obj->u.array, idx, (void **)&node) !=0 )
Quoted 12 lines · Ian Campbell
Quoted 1 line · Wei Liu
... otherwise JSON array elements are not freed and memory is leaked.
How exciting!
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Acked-by Ian Campbell <[email protected]>I assume this isn't a recent issue so this should be a candidate for backporting.
4.2 onwards contains this bug.
Wei.
Wei Liu writes ("Re: [PATCH] libxl_json: remove extra "break""):
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Wei Liu
Quoted 1 line
... otherwise JSON array elements are not freed and memory is leaked.
How exciting!
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Acked-by Ian Campbell <[email protected]>I assume this isn't a recent issue so this should be a candidate for backporting.
4.2 onwards contains this bug.
Thanks. I have applied this and added it to my backport list.
Ian.
Ian Jackson writes ("Re: [PATCH] libxl_json: remove extra "break""):
Quoted 4 lines
Wei Liu writes ("Re: [PATCH]
libxl_json: remove extra "break""):Quoted 1 line
4.2 onwards contains this bug.
Thanks. I have applied this and added it to my backport list.
Backported to 4.4, 4.3, 4.2. Will push soon.
Ian.