summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/cclean.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/utils/cclean.c b/source3/utils/cclean.c
index d98725e7fb..487c107e47 100644
--- a/source3/utils/cclean.c
+++ b/source3/utils/cclean.c
@@ -53,9 +53,14 @@ static void print_record(const char *msg,
const struct connections_data *d)
{
char *idstr = serverid_str(k->pid);
- d_printf("%s: connection %d (%s) to \"%s\" from %u:%u@%s[%s] %s\n", msg,
- k->cnum, idstr, d->servicename, (unsigned)d->uid,
- (unsigned)d->gid, d->machine, d->addr, time_to_asc(d->start));
+ d_printf("%s: connection %d (%s) ", msg, k->cnum, idstr);
+ if (d == NULL) {
+ d_printf("<no data>\n");
+ } else {
+ d_printf("to \"%s\" from %u:%u@%s[%s] %s\n", d->servicename,
+ (unsigned)d->uid, (unsigned)d->gid, d->machine,
+ d->addr, time_to_asc(d->start));
+ }
talloc_free(idstr);
}