--- embedaddon/sudo/plugins/sample/sample_plugin.c 2012/10/09 09:29:52 1.1.1.3 +++ embedaddon/sudo/plugins/sample/sample_plugin.c 2013/07/22 10:46:12 1.1.1.4 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Todd C. Miller + * Copyright (c) 2010-2013 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -306,6 +305,7 @@ find_editor(int nfiles, char * const files[], char **a cp = strtok(editor, " \t"); if (cp == NULL || (editor_path = find_in_path(editor, plugin_state.envp)) == NULL) { + free(editor); return NULL; } if (editor_path != editor) @@ -503,7 +503,7 @@ struct policy_plugin sample_policy = { * Note: This plugin does not differentiate between tty and pipe I/O. * It all gets logged to the same file. */ -struct io_plugin sample_io = { +__dso_public struct io_plugin sample_io = { SUDO_IO_PLUGIN, SUDO_API_VERSION, io_open,