summaryrefslogtreecommitdiffstats
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 781a1aab..26abc881 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
[dh.c]
return group14 when no primes found - fixes hang on empty /etc/moduli;
ok markus@
+ - dtucker@cvs.openbsd.org 2004/08/11 11:09:54
+ [servconf.c]
+ Fix minor leak; "looks right" deraadt@
20040720
- (djm) OpenBSD CVS Sync
@@ -1579,4 +1582,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3492 2004/08/12 12:40:59 dtucker Exp $
+$Id: ChangeLog,v 1.3493 2004/08/12 12:41:44 dtucker Exp $
diff --git a/servconf.c b/servconf.c
index 02fae0fb..36b97a55 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.135 2004/07/11 17:48:47 deraadt Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.136 2004/08/11 11:09:54 dtucker Exp $");
#include "ssh.h"
#include "log.h"
@@ -974,18 +974,18 @@ void
parse_server_config(ServerOptions *options, const char *filename, Buffer *conf)
{
int linenum, bad_options = 0;
- char *cp, *cbuf;
+ char *cp, *obuf, *cbuf;
debug2("%s: config %s len %d", __func__, filename, buffer_len(conf));
- cbuf = xstrdup(buffer_ptr(conf));
+ obuf = cbuf = xstrdup(buffer_ptr(conf));
linenum = 0;
while((cp = strsep(&cbuf, "\n")) != NULL) {
if (process_server_config_line(options, cp, filename,
linenum++) != 0)
bad_options++;
}
- free(cbuf);
+ xfree(obuf);
if (bad_options > 0)
fatal("%s: terminating, %d bad configuration options",
filename, bad_options);