From: Christian Pointner Date: Fri, 1 Oct 2010 21:40:48 +0000 (+0000) Subject: fixed memory bug at client handling of door_daeon and powersensordaemon X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=715ff59d360fde630bd111d6fbf143690a52cd42;p=svn42.git fixed memory bug at client handling of door_daeon and powersensordaemon --- diff --git a/door_daemon/door_daemon.c b/door_daemon/door_daemon.c index b7f7197..bddb28f 100644 --- a/door_daemon/door_daemon.c +++ b/door_daemon/door_daemon.c @@ -431,7 +431,8 @@ int main_loop(int door_fd, int cmd_listen_fd) break; } - lst = lst->next; + if(lst) + lst = lst->next; } if(cmd_q && !cmd_q->sent) diff --git a/powersensordaemon/powersensordaemon.c b/powersensordaemon/powersensordaemon.c index ac96ef0..133533e 100644 --- a/powersensordaemon/powersensordaemon.c +++ b/powersensordaemon/powersensordaemon.c @@ -542,7 +542,8 @@ int main_loop(int tty_fd, int cmd_listen_fd, autosample_process_t* autosample, o break; } - lst = lst->next; + if(lst) + lst = lst->next; } if(cmd_q && !cmd_q->sent)