1 --- /usr/tmp/clean/at-spi-1.7.12/registryd/deviceeventcontroller.c 2006-07-20 23:05:53.000000000 +0100 2 +++ at-spi-1.7.12/registryd/deviceeventcontroller.c 2006-11-07 09:53:03.284843000 +0000 3 @@ -458,6 +458,8 @@ 4 } 5 else 6 spi_dec_set_unlatch_pending (controller, mask_return); 7 + 8 + CORBA_free (e.any_data._value); 9 } 10 return TRUE; 11 } 12 @@ -473,6 +475,7 @@ 13 int *x, int *y, gboolean *moved) 14 { 15 Accessibility_Event e; 16 + Accessibility_EventDetails *details; 17 CORBA_Environment ev; 18 int win_x_return,win_y_return; 19 unsigned int mask_return; 20 @@ -510,6 +513,8 @@ 21 Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry), 22 &e, 23 &ev); 24 + details = e.any_data._value; 25 + CORBA_free (details); 26 e.type = "mouse:rel"; 27 e.source = BONOBO_OBJREF (controller->registry->desktop); 28 e.detail1 = *x - last_mouse_pos->x; 29 @@ -524,6 +529,8 @@ 30 Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry), 31 &e, 32 &ev); 33 + details = e.any_data._value; 34 + CORBA_free (details); 35 *moved = True; 36 } 37 else 38 @@ -564,6 +571,7 @@ 39 Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry), 40 &e, 41 &ev); 42 + CORBA_free (e.any_data._value); 43 } 44 45 static gboolean 46 @@ -1083,6 +1091,7 @@ 47 Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry), 48 &e, 49 &ev); 50 + CORBA_free (e.any_data._value); 51 } 52 53 xkb_mod_unlatch_occurred = (xevent->type == ButtonPress || 54 @@ -2509,6 +2518,7 @@ 55 { 56 CORBA_Environment ev; 57 Accessibility_DeviceEvent key_event; 58 + gboolean ret; 59 60 g_assert (event->type == KeyPress || event->type == KeyRelease); 61 62 @@ -2520,7 +2530,9 @@ 63 spi_controller_update_key_grabs (controller, &key_event); 64 65 /* relay to listeners, and decide whether to consume it or not */ 66 - return spi_controller_notify_keylisteners (controller, &key_event, CORBA_TRUE, &ev); 67 + ret = spi_controller_notify_keylisteners (controller, &key_event, CORBA_TRUE, &ev); 68 + CORBA_free(key_event.event_string); 69 + return ret; 70 } 71 72 SpiDEController * 73 --- /usr/tmp/clean/at-spi-1.7.12/registryd/registry.c 2006-09-18 22:03:48.000000000 +0100 74 +++ at-spi-1.7.12/registryd/registry.c 2006-11-07 13:05:49.782164000 +0000 75 @@ -602,7 +602,7 @@ 76 CORBA_Environment *ev; 77 Bonobo_Unknown source; 78 EventTypeStruct etype; 79 - Accessibility_Event e_out; 80 + Accessibility_Event *e_out; 81 } NotifyContext; 82 83 static SpiReEntrantContinue 84 @@ -634,12 +634,12 @@ 85 } 86 #endif 87 88 - ctx->e_out.source = ctx->source; 89 + ctx->e_out->source = ctx->source; 90 91 if ((*list) && (*list)->data == ls) 92 { 93 Accessibility_EventListener_notifyEvent ( 94 - (Accessibility_EventListener) ls->listener, &ctx->e_out, ctx->ev); 95 + (Accessibility_EventListener) ls->listener, ctx->e_out, ctx->ev); 96 if (ctx->ev->_major != CORBA_NO_EXCEPTION) 97 { 98 DBG (1, g_warning ("Accessibility app error: exception during " 99 @@ -679,11 +679,7 @@ 100 new_ctx->etype.major = ctx->etype.major; 101 new_ctx->etype.minor = ctx->etype.minor; 102 new_ctx->etype.detail = ctx->etype.detail; 103 - new_ctx->e_out.type = CORBA_string_dup (ctx->e_out.type); 104 - new_ctx->e_out.source = ctx->e_out.source; 105 - new_ctx->e_out.detail1 = ctx->e_out.detail1; 106 - new_ctx->e_out.detail2 = ctx->e_out.detail2; 107 - CORBA_any__copy (&(new_ctx->e_out.any_data), &(ctx->e_out.any_data)); 108 + new_ctx->e_out = ORBit_copy_value (ctx->e_out, TC_Accessibility_Event); 109 return new_ctx; 110 } 111 112 @@ -717,9 +713,7 @@ 113 bonobo_object_release_unref (q_ctx->source, NULL); 114 } 115 CORBA_free ((void *)q_ctx->etype.event_name); 116 - CORBA_free ((void *)q_ctx->e_out.type); 117 - if (q_ctx->e_out.any_data._type != TC_null) 118 - CORBA_free ((void *)q_ctx->e_out.any_data._value); 119 + CORBA_free (q_ctx->e_out); 120 g_free (q_ctx); 121 } 122 registry->is_queueing = FALSE; 123 @@ -834,25 +828,20 @@ 124 static gboolean 125 registry_queue_event (SpiRegistry *registry, NotifyContext *ctx) 126 { 127 - NotifyContext *q_ctx = registry_clone_notify_context (ctx); 128 #ifdef SPI_QUEUE_DEBUG 129 - if (q_ctx->etype.type_cat != ETYPE_MOUSE) 130 - fprintf (stderr, "push! %s %p\n", q_ctx->etype.event_name, q_ctx); 131 + if (ctx->etype.type_cat != ETYPE_MOUSE) 132 + fprintf (stderr, "push! %s %p\n", ctx->etype.event_name, ctx); 133 #endif 134 if (registry->is_queueing) 135 { 136 + NotifyContext *q_ctx = registry_clone_notify_context (ctx); 137 + 138 g_queue_push_head (registry->deferred_event_queue, q_ctx); 139 140 return FALSE; 141 } 142 else 143 { 144 - bonobo_object_release_unref (q_ctx->source, NULL); 145 - CORBA_free ((void *)q_ctx->etype.event_name); 146 - CORBA_free ((void *)q_ctx->e_out.type); 147 - if (q_ctx->e_out.any_data._type != TC_null) 148 - CORBA_free ((void *)q_ctx->e_out.any_data._value); 149 - g_free (q_ctx); 150 return TRUE; 151 } 152 } 153 @@ -917,7 +906,7 @@ 154 parse_event_type (&ctx.etype, e->type); 155 156 ctx.ev = ev; 157 - ctx.e_out = *e; 158 + ctx.e_out = (Accessibility_Event *)e; 159 ctx.source = e->source; 160 161 #ifdef SPI_QUEUE_DEBUG 162