From 79faf3a3c927fab25f6aefe06b6493a4e36ff6da Mon Sep 17 00:00:00 2001 From: "Sergey V. Udaltsov" Date: Wed, 27 Jul 2005 22:50:42 +0000 Subject: [PATCH] tiny bit of code polish --- capplets/keyboard/gnome-keyboard-properties-xkbpv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c index bd6640ec3..22c6fda6a 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c @@ -84,16 +84,13 @@ xkb_layout_preview_update (GladeXML * chooserDialog) if (XklConfigGetFromServer (&data)) { if( ( p = data.layouts ) != NULL ) - { for( i = data.numLayouts; --i >= 0; ) free( *p++ ); - } if( ( p = data.variants ) != NULL ) - { for( i = data.numVariants; --i >= 0; ) free( *p++ ); - } + data.numLayouts = data.numVariants = 1; data.layouts = realloc (data.layouts, sizeof (char*));