Fix segfault (bug #129837) Patch provided by Jeff Franks.
authorPadraig O'Briain <padraig.obriain@sun.com>
Fri, 2 Jan 2004 12:44:47 +0000 (12:44 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Fri, 2 Jan 2004 12:44:47 +0000 (12:44 +0000)
2004-01-02  Padraig O'Briain  <padraig.obriain@sun.com>

* atk/atktext.c (atk_text_free_ranges): Fix segfault (bug #129837)
Patch provided by Jeff Franks.

ChangeLog
atk/atktext.c

index b53d2438a60b3e2a412f375369721d1d0b1c423d..2a05260d8ab37a39d47067996b1eb6f9e89c4a66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-02  Padraig O'Briain  <padraig.obriain@sun.com>
+
+       * atk/atktext.c (atk_text_free_ranges): Fix segfault (bug #129837)
+       Patch provided by Jeff Franks.
+
 2003-12-17  Padraig O'Briain  <padraig.obriain@sun.com>
 
        * atk/atkobject.c: Change "accel label" to "accelerator label".
index 85f376d551343827ff99268da9614d8e864fb8e8..d9ceb058580da97fc354eeb185068d2c2de9320a 100755 (executable)
@@ -1307,6 +1307,8 @@ atk_text_real_get_bounded_ranges (AtkText          *text,
 void
 atk_text_free_ranges (AtkTextRange **ranges)
 {
+  AtkTextRange **first = ranges;
+
   if (ranges)
     {
       while (*ranges)
@@ -1316,8 +1318,8 @@ atk_text_free_ranges (AtkTextRange **ranges)
           range = *ranges;
           *ranges++;
           g_free (range->content);
-          g_free (ranges);
+          g_free (range);
         }
-      g_free (ranges);
+      g_free (first);
     }
 }