|
|
324fcf |
diff --git a/server/confpars.c b/server/confpars.c
|
|
|
324fcf |
index d79489b..c20d618 100644
|
|
|
324fcf |
--- a/server/confpars.c
|
|
|
324fcf |
+++ b/server/confpars.c
|
|
|
324fcf |
@@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
|
|
324fcf |
|
|
|
324fcf |
cfile = (struct parse *)0;
|
|
|
324fcf |
#if defined (TRACING)
|
|
|
324fcf |
+ // No need to dmalloc huge memory region if we're not going to re-play
|
|
|
324fcf |
+ if (!trace_playback()){
|
|
|
324fcf |
+ status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
|
|
324fcf |
+ goto noreplay;
|
|
|
324fcf |
+ };
|
|
|
324fcf |
flen = lseek (file, (off_t)0, SEEK_END);
|
|
|
324fcf |
if (flen < 0) {
|
|
|
324fcf |
boom:
|
|
|
324fcf |
@@ -174,6 +179,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
|
|
324fcf |
#else
|
|
|
324fcf |
status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
|
|
324fcf |
#endif
|
|
|
324fcf |
+ noreplay:
|
|
|
324fcf |
if (status != ISC_R_SUCCESS || cfile == NULL)
|
|
|
324fcf |
return status;
|
|
|
324fcf |
|
|
|
324fcf |
diff --git a/server/confpars.c b/server/confpars.c
|
|
|
324fcf |
index 3aecd05..5be4ab1 100644
|
|
|
324fcf |
--- a/server/confpars.c
|
|
|
324fcf |
+++ b/server/confpars.c
|
|
|
324fcf |
@@ -176,6 +176,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
|
|
324fcf |
if (trace_record ())
|
|
|
324fcf |
trace_write_packet (ttype, ulen + tflen + 1, dbuf, MDL);
|
|
|
324fcf |
status = new_parse(&cfile, -1, fbuf, ulen, filename, 0); /* XXX */
|
|
|
324fcf |
+ dfree(dbuf, MDL);
|
|
|
324fcf |
#else
|
|
|
324fcf |
status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
|
|
324fcf |
#endif
|
|
|
324fcf |
@@ -188,9 +189,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
|
|
324fcf |
else
|
|
|
324fcf |
status = conf_file_subparse (cfile, group, group_type);
|
|
|
324fcf |
end_parse (&cfile);
|
|
|
324fcf |
-#if defined (TRACING)
|
|
|
324fcf |
- dfree (dbuf, MDL);
|
|
|
324fcf |
-#endif
|
|
|
324fcf |
return status;
|
|
|
324fcf |
}
|