Fix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults...