summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
committerSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
commit7019bfe546912397e7f4d37a44a510ce17a7febb (patch)
tree38c00e34ce75329ad7f345174328f19b5bc5887f /source3/nsswitch
parent72544acc0d8fe7d3b43c3472638fe0ff847e993f (diff)
downloadsamba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.gz
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.bz2
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.zip
fixes (asprintf) from 2.2
(This used to be commit 6b123adda901ff05b0271eeda060297448f64eec)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cm.c10
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);
+ }
}
}