Description: utils: drop useless g_file_test() call canonicalize_file_name() returns NULL if file doesn't exist, so no need to check file existence with g_file_test(). Without this patch calls to this function (as in the test-generated tests) will fail on glib2.0 v2.53+ due to a NULL check introduced in g_file_test. The NULL check introduction was tracked at: https://bugzilla.gnome.org/show_bug.cgi?id=755046 Author: Mikhail Efremov Origin: https://cgit.freedesktop.org/libqmi/commit/src/libqmi-glib/qmi-utils.c?id=07da0340043b3b4d3ffc005e0a10b4776157a0fe Bug-Debian: https://bugs.debian.org/865579 Bug-Ubuntu: https://launchpad.net/bugs/1699599 Forwarded: not-needed Applied-Upstream: 07da0340043b3b4d3ffc005e0a10b4776157a0fe Last-Update: 2017-06-22 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/libqmi-glib/qmi-utils.c +++ b/src/libqmi-glib/qmi-utils.c @@ -743,8 +743,10 @@ __qmi_utils_get_driver (const gchar *cdc path = canonicalize_file_name (tmp); g_free (tmp); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - driver = g_path_get_basename (path); + if (!path) + continue; + + driver = g_path_get_basename (path); g_free (path); }