diff options
-rw-r--r-- | lib/talloc/talloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 478767c955..f103a9b941 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -1421,8 +1421,10 @@ static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_ */ void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f) { - talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f); - fflush(f); + if (f) { + talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f); + fflush(f); + } } /* |