summaryrefslogtreecommitdiff
path: root/servconf.c
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 /servconf.c
parent9a2bd1116bf3fdb236d8b10af1acb2e7e8fe6e60 (diff)
- dtucker@cvs.openbsd.org 2004/08/11 11:09:54
[servconf.c] Fix minor leak; "looks right" deraadt@
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c8
1 files changed, 4 insertions, 4 deletions
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);