Fix a memory leak in Permissions.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@738319 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java b/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
index 1eb5660..ee4d570 100644
--- a/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
+++ b/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
@@ -177,7 +177,14 @@
                 return false;
             }
 
-            return entry.equals(o);
+            if (o instanceof Entry) 
+            {
+                return entry.equals(((Entry)o).get());
+            } 
+            else 
+            {
+                return false;
+            }
         }
     }