Date: Fri, 8 May 2020 16:41:23 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360818 - head/sys/cam/scsi Message-ID: <202005081641.048GfNou034082@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005081641.048GfNou034082>