Source: libqmi Followup-For: Bug #865579 Dear Maintainer,
Please consider the attached patch to fix libqmi builds when build against glib2.0-2.53.1-1 or later. Thanks! -- System Information: Debian Release: stretch/sid APT prefers artful APT policy: (500, 'artful'), (400, 'artful-proposed') Architecture: amd64 (x86_64) Kernel: Linux 4.10.0-21-generic (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
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 <s...@altlinux.org> 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); }