From 1cb73083e56d87a2297e3694b5156f61fe95f8a2 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 4 Apr 2011 17:14:42 +0300 Subject: [PATCH] xfree86: fix bad free configInputDevices introduced in 93ca526892c0d22afa05cce6496198c652043a19. Signed-off-by: Tiago Vignatti Reviewed-by: Dan Nicholson Reviewed-by: Nicolas Peninguy Reviewed-by: Peter Hutterer --- hw/xfree86/common/xf86Config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 08204a9af..1eda7f84e 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -1502,8 +1502,9 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp) while (irp) { indp[count] = xnfalloc(sizeof(IDevRec)); if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) { - while(count--) + do { free(indp[count]); + } while(count--); free(indp); return FALSE; }