summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-08-12 22:41:44 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-08-12 22:41:44 +1000
commit9fbac719055b66ef2bcd9b4cc98163cd97d829bc (patch)
tree5d14490f3ae849b8ef4c371259ff2f3a672c27af
parent9a2bd1116bf3fdb236d8b10af1acb2e7e8fe6e60 (diff)
- dtucker@cvs.openbsd.org 2004/08/11 11:09:54
[servconf.c] Fix minor leak; "looks right" deraadt@
-rw-r--r--ChangeLog5
-rw-r--r--servconf.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 781a1aaba..26abc8812 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
12 [dh.c] 12 [dh.c]
13 return group14 when no primes found - fixes hang on empty /etc/moduli; 13 return group14 when no primes found - fixes hang on empty /etc/moduli;
14 ok markus@ 14 ok markus@
15 - dtucker@cvs.openbsd.org 2004/08/11 11:09:54
16 [servconf.c]
17 Fix minor leak; "looks right" deraadt@
15 18
1620040720 1920040720
17 - (djm) OpenBSD CVS Sync 20 - (djm) OpenBSD CVS Sync
@@ -1579,4 +1582,4 @@
1579 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1582 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1580 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1583 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1581 1584
1582$Id: ChangeLog,v 1.3492 2004/08/12 12:40:59 dtucker Exp $ 1585$Id: ChangeLog,v 1.3493 2004/08/12 12:41:44 dtucker Exp $
diff --git a/servconf.c b/servconf.c
index 02fae0fbe..36b97a550 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.135 2004/07/11 17:48:47 deraadt Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.136 2004/08/11 11:09:54 dtucker Exp $");
14 14
15#include "ssh.h" 15#include "ssh.h"
16#include "log.h" 16#include "log.h"
@@ -974,18 +974,18 @@ void
974parse_server_config(ServerOptions *options, const char *filename, Buffer *conf) 974parse_server_config(ServerOptions *options, const char *filename, Buffer *conf)
975{ 975{
976 int linenum, bad_options = 0; 976 int linenum, bad_options = 0;
977 char *cp, *cbuf; 977 char *cp, *obuf, *cbuf;
978 978
979 debug2("%s: config %s len %d", __func__, filename, buffer_len(conf)); 979 debug2("%s: config %s len %d", __func__, filename, buffer_len(conf));
980 980
981 cbuf = xstrdup(buffer_ptr(conf)); 981 obuf = cbuf = xstrdup(buffer_ptr(conf));
982 linenum = 0; 982 linenum = 0;
983 while((cp = strsep(&cbuf, "\n")) != NULL) { 983 while((cp = strsep(&cbuf, "\n")) != NULL) {
984 if (process_server_config_line(options, cp, filename, 984 if (process_server_config_line(options, cp, filename,
985 linenum++) != 0) 985 linenum++) != 0)
986 bad_options++; 986 bad_options++;
987 } 987 }
988 free(cbuf); 988 xfree(obuf);
989 if (bad_options > 0) 989 if (bad_options > 0)
990 fatal("%s: terminating, %d bad configuration options", 990 fatal("%s: terminating, %d bad configuration options",
991 filename, bad_options); 991 filename, bad_options);