summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/rcorder/rcorder.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c
index 14a7707..5bf60cb 100644
--- a/sbin/rcorder/rcorder.c
+++ b/sbin/rcorder/rcorder.c
@@ -722,6 +722,10 @@ keep_ok(fnode)
* is ok, we loop over the filenodes requirements, calling satisfy_req()
* for each of them.. once we have done this, remove this filenode
* from each provision table, as we are now done.
+ *
+ * NOTE: do_file() is called recursively from several places and cannot
+ * safely free() anything related to items that may be recursed on.
+ * Circular dependancies will cause problems if we do.
*/
void
do_file(fnode)
@@ -757,8 +761,10 @@ do_file(fnode)
r_tmp = r;
satisfy_req(r, fnode->filename);
r = r->next;
+#if 0
if (was_set == 0)
- free(r_tmp);
+ free(r_tmp);
+#endif
}
fnode->req_list = NULL;
@@ -797,10 +803,12 @@ do_file(fnode)
}
DPRINTF((stderr, "nuking %s\n", fnode->filename));
+#if 0
if (was_set == 0) {
free(fnode->filename);
free(fnode);
}
+#endif
}
void
OpenPOWER on IntegriCloud