From f5e68bcfa1145d45e04012a8acfb6104c86d61ce Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 19 Nov 2003 22:57:53 +0000 Subject: Look at error before using it in debug statement. Jeremy. (This used to be commit 42114b75f2c082522f7806a1af11409609785b06) --- source3/lib/module.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source3/lib/module.c b/source3/lib/module.c index 38fcf0f329..2abe918ef4 100644 --- a/source3/lib/module.c +++ b/source3/lib/module.c @@ -42,9 +42,8 @@ static NTSTATUS do_smb_load_module(const char *module_name, BOOL is_probe) if(!handle) { int level = is_probe ? 3 : 0; - DEBUG(level, ("Error loading module '%s': %s\n", module_name, - sys_dlerror())); - + error = sys_dlerror(); + DEBUG(level, ("Error loading module '%s': %s\n", module_name, error ? error : "")); return NT_STATUS_UNSUCCESSFUL; } -- cgit