From 7019bfe546912397e7f4d37a44a510ce17a7febb Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 19 Jan 2002 17:29:32 +0000 Subject: fixes (asprintf) from 2.2 (This used to be commit 6b123adda901ff05b0271eeda060297448f64eec) --- source3/nsswitch/winbindd_cm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/nsswitch') 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); + } } } -- cgit