Author: pfg
Date: Mon Apr 20 16:31:27 2015
New Revision: 281769
URL: https://svnweb.freebsd.org/changeset/base/281769

Log:
  g_uncompress_taste: prevent a double free.
  
  Found by:     Clang Static Analyzer
  MFC after:    1 week

Modified:
  head/sys/geom/uncompress/g_uncompress.c

Modified: head/sys/geom/uncompress/g_uncompress.c
==============================================================================
--- head/sys/geom/uncompress/g_uncompress.c     Mon Apr 20 16:23:59 2015        
(r281768)
+++ head/sys/geom/uncompress/g_uncompress.c     Mon Apr 20 16:31:27 2015        
(r281769)
@@ -571,6 +571,7 @@ g_uncompress_taste(struct g_class *mp, s
                    (buf+sizeof(struct cloop_header)))[i]);
        }
        free(buf, M_GEOM);
+       buf = NULL;
        DPRINTF(("%s: done reading offsets\n", gp->name));
        mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF);
        sc->last_blk = -1;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to