Author: mav
Date: Tue Oct 22 13:56:30 2013
New Revision: 256895
URL: http://svnweb.freebsd.org/changeset/base/256895

Log:
  Fix memory and references leak due to unfreed path.
  
  Coverity CID: 1054773

Modified:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c   Tue Oct 22 13:53:58 2013        (r256894)
+++ head/sys/cam/cam_periph.c   Tue Oct 22 13:56:30 2013        (r256895)
@@ -1768,9 +1768,11 @@ cam_periph_error(union ccb *ccb, cam_fla
                                scan_ccb->ccb_h.func_code = XPT_SCAN_TGT;
                                scan_ccb->crcn.flags = 0;
                                xpt_rescan(scan_ccb);
-                       } else
+                       } else {
                                xpt_print(newpath,
                                    "Can't allocate CCB to rescan target\n");
+                               xpt_free_path(newpath);
+                       }
                }
        }
 
_______________________________________________
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"

Reply via email to