Date: Thu, 14 May 2020 18:19:29 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361040 - in stable: 11/sys/cam/scsi 12/sys/cam/scsi Message-ID: <202005141819.04EIJTPc097611@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/11/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_enc_ses.c Thu May 14 17:56:44 2020 (r361039) +++ stable/11/sys/cam/scsi/scsi_enc_ses.c Thu May 14 18:19:28 2020 (r361040) @@ -2956,7 +2956,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005141819.04EIJTPc097611>