svn commit: r320475 - stable/11/sys/cam/scsi
Mark Johnston
markj at FreeBSD.org
Thu Jun 29 17:34:50 UTC 2017
Author: markj
Date: Thu Jun 29 17:34:48 2017
New Revision: 320475
URL: https://svnweb.freebsd.org/changeset/base/320475
Log:
MFC r320372:
Fix a memory leak in ses_get_elm_devnames().
Approved by: re (gjb)
Modified:
stable/11/sys/cam/scsi/scsi_enc_ses.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 17:29:07 2017 (r320474)
+++ stable/11/sys/cam/scsi/scsi_enc_ses.c Thu Jun 29 17:34:48 2017 (r320475)
@@ -2684,10 +2684,11 @@ ses_get_elm_devnames(enc_softc_t *enc, encioc_elm_devn
cam_periph_unlock(enc->periph);
sbuf_new(&sb, NULL, len, SBUF_FIXEDLEN);
ses_paths_iter(enc, &enc->enc_cache.elm_map[elmdn->elm_idx],
- ses_elmdevname_callback, &sb);
+ ses_elmdevname_callback, &sb);
sbuf_finish(&sb);
elmdn->elm_names_len = sbuf_len(&sb);
copyout(sbuf_data(&sb), elmdn->elm_devnames, elmdn->elm_names_len + 1);
+ sbuf_delete(&sb);
cam_periph_lock(enc->periph);
return (elmdn->elm_names_len > 0 ? 0 : ENODEV);
}
More information about the svn-src-stable
mailing list