From: Adam Dickmeiss Date: Thu, 8 Oct 2009 20:57:43 +0000 (+0200) Subject: Fix SEGV for quit command in cmdfile X-Git-Tag: v3.0.50~3^2~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=dfcd482cb9c615dd3f0410d20f5d9a398e701ade;p=yaz-moved-to-github.git Fix SEGV for quit command in cmdfile If cmdfile is passed to yaz-client (option -f) and that cmdfile included a 'quit' command that would result in a memory violation. --- diff --git a/client/client.c b/client/client.c index cea207c..2692a9c 100644 --- a/client/client.c +++ b/client/client.c @@ -3899,9 +3899,10 @@ static void initialize(const char *rc_file) cmd_format("usmarc"); + file_history = file_history_new(); + source_rc_file(rc_file); - file_history = file_history_new(); file_history_load(file_history); file_history_trav(file_history, 0, add_to_readline_history); }