/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/splashy.c

  • Committer: Teddy Hogeborn
  • Date: 2008-09-23 20:32:01 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080923203201-3206nf092qsy7rvk
* plugins.d/splashy.c (main): Bug fix: free "exe_link".

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
      char exe_target[sizeof(splashy_name)];
88
88
      ssize_t sret = readlink(exe_link, exe_target,
89
89
                              sizeof(exe_target));
 
90
      free(exe_link);
90
91
      if((sret == ((ssize_t)sizeof(exe_target)-1))
91
92
         and (memcmp(splashy_name, exe_target,
92
93
                     sizeof(exe_target)-1) == 0)){
195
196
  if(interrupted_by_signal){
196
197
    kill(splashy_command_pid, SIGTERM);
197
198
  }
198
 
 
 
199
  
199
200
  pid_t new_splashy_pid = fork();
200
201
  if(new_splashy_pid == 0){
 
202
    /* Child; will become new splashy process */
201
203
    while(kill(splashy_pid, 0)){
202
204
      sleep(2);
203
205
      kill(splashy_pid, SIGKILL);