From 715ff59d360fde630bd111d6fbf143690a52cd42 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 1 Oct 2010 21:40:48 +0000 Subject: [PATCH] fixed memory bug at client handling of door_daeon and powersensordaemon --- door_daemon/door_daemon.c | 3 ++- powersensordaemon/powersensordaemon.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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) -- 1.7.10.4