nwrap: remove unused member list from struct nwrap_he
[obnox/samba/samba-obnox.git] / lib / nss_wrapper / nss_wrapper.c
index a8cbc222ac79e4d4f330f933289cf031263644b0..32d869b5855d4b881d29d81cb2f73ad6dac7e7a9 100644 (file)
@@ -770,7 +770,6 @@ struct nwrap_entlist {
 struct nwrap_he {
        struct nwrap_cache *cache;
 
-       struct nwrap_entdata *list;
        struct nwrap_vector entdata;
 
        int num;
@@ -2610,21 +2609,20 @@ static bool nwrap_ed_inventarize_add_to_existing(struct nwrap_entdata *const ed,
                return false;
        }
 
-       el_new = nwrap_entlist_init(ed);
-       if (el_new == NULL) {
-               return false;
-       }
 
        for (cursor = el; cursor->next != NULL; cursor = cursor->next)
        {
                if (cursor->ed == ed) {
-                       free(el_new);
                        return false;
                }
        }
 
        if (cursor->ed == ed) {
-               free(el_new);
+               return false;
+       }
+
+       el_new = nwrap_entlist_init(ed);
+       if (el_new == NULL) {
                return false;
        }