diff options
Diffstat (limited to 'source3/nsswitch/winbindd_cm.c')
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 013289ed13..5d6c758e10 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -712,10 +712,12 @@ static void dump_conn_list(void) /* Display pipe info */ - asprintf(&msg, "\t%-15s %-15s %-16s", con->domain, con->controller, con->pipe_name); - - DEBUG(0, ("%s\n", msg)); - free(msg); + if (asprintf(&msg, "\t%-15s %-15s %-16s", con->domain, con->controller, con->pipe_name) < 0) { + DEBUG(0, ("Error: not enough memory!\n")); + } else { + DEBUG(0, ("%s\n", msg)); + SAFE_FREE(msg); + } } } |