ladishd: fix use of uninitialized memory

sizeof(bool) != sizeof(dbus_bool_t)
on x86, 1 != 4
This commit is contained in:
Nedko Arnaudov 2011-05-16 06:52:13 +03:00
parent deab81c2ef
commit 7f512b33fc
1 changed files with 3 additions and 1 deletions

View File

@ -258,6 +258,7 @@ ladish_app_supervisor_add(
{
struct ladish_app * app_ptr;
dbus_bool_t running;
dbus_bool_t dbus_terminal;
app_ptr = malloc(sizeof(struct ladish_app));
if (app_ptr == NULL)
@ -309,6 +310,7 @@ ladish_app_supervisor_add(
supervisor_ptr->version++;
running = false;
dbus_terminal = terminal;
dbus_signal_emit(
g_dbus_connection,
supervisor_ptr->opath,
@ -319,7 +321,7 @@ ladish_app_supervisor_add(
&app_ptr->id,
&app_ptr->name,
&running,
&terminal,
&dbus_terminal,
&app_ptr->level);
return (ladish_app_handle)app_ptr;