Author: trociny Date: Sun May 15 12:39:30 2011 New Revision: 221953 URL: http://svn.freebsd.org/changeset/base/221953
Log: Fix a memory leak possible in g_eli_key_allocate() if the key with the same keyno is added while we aren't holding the lock. Approved by: pjd (mentor) MFC after: 1 week Modified: head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Sun May 15 11:45:13 2011 (r221952) +++ head/sys/geom/eli/g_eli_key_cache.c Sun May 15 12:39:30 2011 (r221953) @@ -124,6 +124,7 @@ g_eli_key_allocate(struct g_eli_softc *s ekey = RB_FIND(g_eli_key_tree, &sc->sc_ekeys_tree, &keysearch); if (ekey != NULL) { bzero(key, sizeof(*key)); + free(key, M_ELI); key = ekey; TAILQ_REMOVE(&sc->sc_ekeys_queue, key, gek_next); } else { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"