(5) fix foo_mem_clean() functions to avoid race cond.
authorkremlin <ian@kremlin.cc>
Tue, 5 Aug 2014 02:18:51 +0000 (21:18 -0500)
committerkremlin <ian@kremlin.cc>
Tue, 5 Aug 2014 02:18:51 +0000 (21:18 -0500)
commit5a2ebcdb9775e789cec2d66545a581846f55d937
tree1caa4744472945fa20d75942b34c7d281c9f80b5
parentca5a7f9fddc137fca1cb9bdaa9fbfd7525fb03cc
(5) fix foo_mem_clean() functions to avoid race cond.

mem_clean functions previously free()'d our pointer array without
first checking that the name/interface had properly been unexported from
dbus. checking first better guarantees all operations implicating that date
have ceased, and that it is safe to go ahead and stop the GMainLoop before
immediately returning. this causes the code just after the main_loop_begin()
call to start functioning, in our case the actual free() calls (which are now
*absolutley* safe to call)
src/interfaces/localed/localed.c
src/interfaces/logind/logind.c
src/interfaces/timedated/timedated.c