in some cases, pulse events trigger spawning another pulse instance, and
the environment at this time is used to determine whether to attempt an
x11 connection
fix T2599
@fix
==27523== Invalid write of size 8
==27523== at 0x9E855F5: _ecore_time_wrapper (ecore_audio_pulse_ml.c:132)
==27523== by 0x647E5CF: _ecore_call_task_cb (ecore_private.h:336)
==27523== by 0x647FB8B: _ecore_timer_expired_call (ecore_timer.c:733)
==27523== by 0x647F9EE: _ecore_timer_expired_timers_call (ecore_timer.c:686)
==27523== by 0x647B4CE: _ecore_main_loop_iterate_internal (ecore_main.c:1814)
==27523== by 0x647998E: ecore_main_loop_begin (ecore_main.c:983)
==27523== by 0x4E4F676: elm_run (elm_main.c:1099)
==27523== by 0x12801B: elm_main (test.c:1010)
==27523== by 0x1280C4: main (test.c:1021)
==27523== Address 0x20537208 is 8 bytes inside a block of size 56 free'd
==27523== at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==27523== by 0x9E858ED: _ecore_pa_time_free (ecore_audio_pulse_ml.c:204)
==27523== by 0x108DB350: free_events (socket-client.c:109)
==27523== by 0x108DBA53: do_call (socket-client.c:157)
==27523== by 0x9E855F0: _ecore_time_wrapper (ecore_audio_pulse_ml.c:131)
==27523== by 0x647E5CF: _ecore_call_task_cb (ecore_private.h:336)
==27523== by 0x647FB8B: _ecore_timer_expired_call (ecore_timer.c:733)
==27523== by 0x647F9EE: _ecore_timer_expired_timers_call (ecore_timer.c:686)
==27523== by 0x647B4CE: _ecore_main_loop_iterate_internal (ecore_main.c:1814)
==27523== by 0x647998E: ecore_main_loop_begin (ecore_main.c:983)
==27523== by 0x4E4F676: elm_run (elm_main.c:1099)
==27523== by 0x12801B: elm_main (test.c:1010)
==27523== by 0x1280C4: main (test.c:1021)
@fix
valid fd before calling read().
Reuse returned fd variable in the callback to save extra function call
to ecore_main_fd_handler_fd_get (since we already acquired the fd
above).
Signed-off-by: Chris Michael <cp.michael@samsung.com>