[vlc-commits] smb2: add missing error check

Thomas Guillem git at videolan.org
Mon Mar 18 14:13:34 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Mar 18 14:12:56 2019 +0100| [014e84a30c54a1831ed4deeac6506d98cde503b8] | committer: Thomas Guillem

smb2: add missing error check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=014e84a30c54a1831ed4deeac6506d98cde503b8
---

 modules/access/smb2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/smb2.c b/modules/access/smb2.c
index 8c91468ed8..41864ccfa8 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -550,6 +550,8 @@ vlc_smb2_resolve(stream_t *access, const char *host, unsigned port)
     /* Test if the host is a netbios name */
     char *out_host = NULL;
     netbios_ns *ns = netbios_ns_new();
+    if (!ns)
+        return NULL;
     uint32_t ip4_addr;
     if (netbios_ns_resolve(ns, host, NETBIOS_FILESERVER, &ip4_addr) == 0)
     {



More information about the vlc-commits mailing list