svn commit: r361040 - in stable: 11/sys/cam/scsi 12/sys/cam/scsi
John Baldwin
jhb at FreeBSD.org
Thu May 14 18:19:29 UTC 2020
Author: jhb
Date: Thu May 14 18:19:28 2020
New Revision: 361040
URL: https://svnweb.freebsd.org/changeset/base/361040
Log:
MFC 360818: Fix a memory leak for ENCIOC_GETSTRING I introduced in r360171.
Modified:
stable/12/sys/cam/scsi/scsi_enc_ses.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/cam/scsi/scsi_enc_ses.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_enc_ses.c Thu May 14 17:56:44 2020 (r361039)
+++ stable/12/sys/cam/scsi/scsi_enc_ses.c Thu May 14 18:19:28 2020 (r361040)
@@ -2958,7 +2958,7 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s
ret = enc_runcmd(enc, cdb, 6, buf, &amt);
if (ret == 0 && ioc == ENCIOC_GETSTRING)
ret = copyout(buf, sstr->buf, sstr->bufsiz);
- if (ioc == ENCIOC_SETSTRING)
+ if (ioc == ENCIOC_SETSTRING || ioc == ENCIOC_GETSTRING)
ENC_FREE(buf);
return (ret);
}
More information about the svn-src-all
mailing list