From: Ian Campbell Subject: Re: [PATCH] libxl_json: remove extra "break" Date: Wed, 9 Apr 2014 14:34:50 +0100 Message-ID: <1397050490.6275.56.camel@kazak.uk.xensource.com> References: <1397050153-16863-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397050153-16863-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-04-09 at 14:29 +0100, Wei Liu wrote: > ... otherwise JSON array elements are not freed and memory is leaked. How exciting! > Signed-off-by: Wei Liu Acked-by: Ian Campbell I assume this isn't a recent issue so this should be a candidate for backporting. > --- > tools/libxl/libxl_json.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c > index d2f7de8..989ac3f 100644 > --- a/tools/libxl/libxl_json.c > +++ b/tools/libxl/libxl_json.c > @@ -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)