fixed memory bug at client handling of door_daeon and powersensordaemon
authorChristian Pointner <equinox@realraum.at>
Fri, 1 Oct 2010 21:40:48 +0000 (21:40 +0000)
committerChristian Pointner <equinox@realraum.at>
Fri, 1 Oct 2010 21:40:48 +0000 (21:40 +0000)
door_daemon/door_daemon.c
powersensordaemon/powersensordaemon.c

index b7f7197..bddb28f 100644 (file)
@@ -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)
index ac96ef0..133533e 100644 (file)
@@ -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)