diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c index 2378dbde59e2..ae04e2ac12d9 100644 --- a/sys/netsmb/smb_conn.c +++ b/sys/netsmb/smb_conn.c @@ -1,4 +1,4 @@ -/* $NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $ */ +/* $NetBSD: smb_conn.c,v 1.29.18.1 2019/05/07 18:55:48 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.18.1 2019/05/07 18:55:48 martin Exp $"); /* * Connection engine. @@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec, if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL) goto fail; - if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL) + if (vcspec->lap && + (vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL) goto fail; if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)