keyfile: replace g_str_equal() with g_strcmp0()

It fixes crash when nm_keyfile_connection_get_path() returns NULL.
This commit is contained in:
Jiří Klimeš
2013-11-01 12:29:31 +01:00
parent abe4f4daf5
commit fc9eae55b3

View File

@@ -160,7 +160,7 @@ find_by_path (SCPluginKeyfile *self, const char *path)
g_hash_table_iter_init (&iter, priv->connections);
while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
if (g_str_equal (path, nm_keyfile_connection_get_path (candidate)))
if (g_strcmp0 (path, nm_keyfile_connection_get_path (candidate)) == 0)
return candidate;
}
return NULL;