]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Don't depend on a feature that has a dependency to the same feauture during unload
authorMartin Willi <martin@revosec.ch>
Wed, 29 Feb 2012 15:07:16 +0000 (16:07 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 2 May 2012 12:05:52 +0000 (14:05 +0200)
src/libstrongswan/plugins/plugin_loader.c

index 164b68e604968929484048148b258590de5cd484..94ef00b2e2ef236a0be3794c0a456d3b9f9ad56a 100644 (file)
@@ -361,7 +361,8 @@ static bool dependency_required(private_plugin_loader_t *this,
                count = entry->plugin->get_features(entry->plugin, &features);
                for (i = 0; i < count; i++)
                {
-                       if (feature_loaded(this, entry, &features[i]))
+                       if (&features[i] != dep &&
+                               feature_loaded(this, entry, &features[i]))
                        {
                                while (++i < count && (features[i].kind == FEATURE_DEPENDS ||
                                                                           features[i].kind == FEATURE_SDEPEND))