diff options
author | H. Peter Anvin <hpa@zytor.com> | 2006-10-04 10:19:23 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-10-04 10:19:23 -0700 |
commit | f3beb3a11954044a99c998979cb72ca1b6e6a661 (patch) | |
tree | d6d366d6f16458ce15a33e34470a18303ca1f8ed | |
parent | 40133b212b38082200e0cdda7baa8b89b7ff6801 (diff) | |
parent | 9b969ddd0e539231963012717edc66b45a036cda (diff) | |
download | tftp-hpa-f3beb3a11954044a99c998979cb72ca1b6e6a661.tar.gz |
Merge with git+ssh://master.kernel.org/pub/scm/network/tftp/tftp-hpa.git
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | tftp/main.c | 12 |
2 files changed, 12 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Changes in 0.43: + Fix double-free error on ^c in client. + + Changes in 0.42: Try to disable path MTU discovery for TFTP connections (it's useless anyway.) diff --git a/tftp/main.c b/tftp/main.c index f58cf45..3a8315f 100644 --- a/tftp/main.c +++ b/tftp/main.c @@ -304,8 +304,6 @@ main(int argc, char *argv[]) (*c->handler)(pargc, pargv); exit(0); } - if (sigsetjmp(toplevel,1) != 0) - (void)putchar('\n'); #ifdef WITH_READLINE #ifdef HAVE_READLINE_HISTORY_H @@ -313,6 +311,8 @@ main(int argc, char *argv[]) #endif #endif + if (sigsetjmp(toplevel,1) != 0) + (void)putchar('\n'); command(); return 0; /* Never reached */ @@ -336,8 +336,10 @@ getmoreargs(const char *partial, const char *mprompt) elen = strlen(eline); - if (line) + if (line) { free(line); + line = NULL; + } line = xmalloc(len+elen+1); strcpy(line, partial); strcpy(line+len, eline); @@ -734,8 +736,10 @@ command(void) for (;;) { #ifdef WITH_READLINE - if ( line ) + if ( line ) { free(line); + line = NULL; + } line = readline(prompt); if ( !line ) exit(0); /* EOF */ |