svn commit: r360818 - head/sys/cam/scsi
John Baldwin
jhb at FreeBSD.org
Fri May 8 16:41:24 UTC 2020
Author: jhb
Date: Fri May 8 16:41:23 2020
New Revision: 360818
URL: https://svnweb.freebsd.org/changeset/base/360818
Log:
Fix a memory leak for ENCIOC_GETSTRING I introduced in r360171.
MFC after: 1 week
Sponsored by: DARPA
Modified:
head/sys/cam/scsi/scsi_enc_ses.c
Modified: head/sys/cam/scsi/scsi_enc_ses.c
==============================================================================
--- head/sys/cam/scsi/scsi_enc_ses.c Fri May 8 15:05:05 2020 (r360817)
+++ head/sys/cam/scsi/scsi_enc_ses.c Fri May 8 16:41:23 2020 (r360818)
@@ -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-head
mailing list