file_util.c: do not search in Npcap installation folder when calling ws_load_library()
authorPascal Quantin <pascal.quantin@gmail.com>
Wed, 15 Jun 2016 20:42:56 +0000 (13:42 -0700)
committerPascal Quantin <pascal.quantin@gmail.com>
Thu, 16 Jun 2016 01:59:15 +0000 (01:59 +0000)
ws_load_library() is not used to load packet.dll or wpcap.dll (we use ws_module_open() for this).
Let's not lose time checking the folder content.

Change-Id: Ibd4a71b8b0c5ffc0c4c146eca51ad9f20964515b
Reviewed-on: https://code.wireshark.org/review/15938
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
wsutil/file_util.c

index da8f91487ce0e57e6d3ce734acca1a4d088ec0ca..a5cd62fdb7ebb5fb976b5f89ce29b05c77ed0fd2 100644 (file)
@@ -575,19 +575,6 @@ ws_load_library(const gchar *library_name)
             }
       }
 
-      /* At last try the Npcap directory */
-      full_path = g_module_build_path(npcap_path, library_name);
-      full_path_w = g_utf8_to_utf16(full_path, -1, NULL, NULL, NULL);
-
-      if (full_path && full_path_w) {
-            dll_h = LoadLibraryW(full_path_w);
-            if (dll_h) {
-                  g_free(full_path);
-                  g_free(full_path_w);
-                  return dll_h;
-            }
-      }
-
       return NULL;
 }