=== modified file 'plugin-runner.c' --- plugin-runner.c 2008-08-24 09:39:06 +0000 +++ plugin-runner.c 2008-08-24 10:19:59 +0000 @@ -108,9 +108,9 @@ char *copy_name = NULL; if(name != NULL){ copy_name = strdup(name); - } - if(copy_name == NULL){ - return NULL; + if(copy_name == NULL){ + return NULL; + } } *new_plugin = (plugin) { .name = copy_name, @@ -252,24 +252,23 @@ return NULL; } argv[*argc-1] = arg; - argv[*argc] = NULL; + argv[*argc] = NULL; return argv; } static void free_plugin_list(plugin *plugin_list){ - for(plugin *next = plugin_list; plugin_list != NULL; plugin_list = next){ + for(plugin *next; plugin_list != NULL; plugin_list = next){ next = plugin_list->next; - free(plugin_list->name); for(char **arg = plugin_list->argv; *arg != NULL; arg++){ free(*arg); - } + } free(plugin_list->argv); for(char **env = plugin_list->environ; *env != NULL; env++){ free(*env); } free(plugin_list->environ); free(plugin_list); - } + } } int main(int argc, char *argv[]){ @@ -303,7 +302,7 @@ ret = sigaction(SIGCHLD, &sigchld_action, &old_sigchld_action); if(ret == -1){ perror("sigaction"); - exitstatus = EXIT_FAILURE; + exitstatus = EXIT_FAILURE; goto fallback; } @@ -685,7 +684,7 @@ } } - int pipefd[2]; + int pipefd[2]; ret = pipe(pipefd); if (ret == -1){ perror("pipe"); @@ -792,6 +791,7 @@ } free_plugin_list(plugin_list); + plugin_list = NULL; closedir(dir); dir = NULL; === modified file 'plugins.d/password-request.c' --- plugins.d/password-request.c 2008-08-17 22:42:28 +0000 +++ plugins.d/password-request.c 2008-08-24 10:19:59 +0000 @@ -636,6 +636,8 @@ } else { retval = -1; } + } else { + retval = -1; } /* Shutdown procedure */