libss: initialize function pointer for readline_shutdown()

Clear the function pointer for readline_shutdown() so that if libss is
linking against a readline library which doesn't supply a
readline_shutdown() function, ss_delete_invocation() won't seg fault.

Thanks to Solar Designer <solar@openwall.com> for reporting this
problem to me.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o 2009-11-12 17:54:45 -05:00
parent 97f466394e
commit 06ef971be5

View File

@ -71,6 +71,7 @@ int ss_create_invocation(subsystem_name, version_string, info_ptr,
*(new_table->rqt_tables+1) = (ss_request_table *) NULL;
new_table->readline_handle = 0;
new_table->readline_shutdown = 0;
new_table->readline = 0;
new_table->add_history = 0;
new_table->redisplay = 0;