[PATCHv3 13/14] xfree86: fix bad free configInputDevices

Tiago Vignatti tiago.vignatti at nokia.com
Tue Mar 29 08:08:19 PDT 2011


introduced in e1165632bdfbd720889ed1adf5f7ab338032c0ee.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 hw/xfree86/common/xf86Config.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 7a23253..114bdc3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1459,8 +1459,9 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
     while (irp) {
 	indp[count] = xf86AllocateInput();
 	if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
-	    while(count--)
+	    do {
 		free(indp[count]);
+	    } while(count--);
 	    free(indp);
 	    return FALSE;
 	}
-- 
1.7.0.4



More information about the xorg-devel mailing list