From 0e073b8152103d9de9fc68cb5b0dfbb7c9b0327a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 20 Oct 2007 11:12:11 +0200 Subject: Fix for bug 5021 This is a different fix than the bug reporter (Evgeniy Dushistov , thanks!) created, but it lives without the boolean status variable. Untested so far, but I can not add attachments to bugs right now. But to me this looks really obvious. (This used to be commit b481abf5914dcafe5642c4d9394d02603e905bbb) --- source3/libsmb/libsmbclient.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 0b45cad3e1..ff434d275a 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -2671,7 +2671,11 @@ smbc_opendir_ctx(SMBCCTX *context, return NULL; } - ip_list = &server_addr; + ip_list = memdup(&server_addr, sizeof(server_addr)); + if (ip_list == NULL) { + errno = ENOMEM; + return NULL; + } count = 1; } -- cgit