diff options
author | Yuri Pankov <ypankov@tintri.com> | 2022-11-24 17:28:27 +0100 |
---|---|---|
committer | Gordon Ross <gwr@racktopsystems.com> | 2022-12-15 18:48:39 -0500 |
commit | 92f549282aaface1e6f92329085e28edcf24054f (patch) | |
tree | ddf2761e7430e213911daf18145f8fe571492225 | |
parent | 7b5987898994d86cd20e00dbf8c305dfbfbb8bea (diff) | |
download | illumos-gate-92f549282aaface1e6f92329085e28edcf24054f.tar.gz |
15207 libfmd_agent: memory leak in fmd_agent_nvl_ioctl
Reviewed by: Alexander Eremin <aeremin@tintri.com>
Reviewed by: Andrew Giles <agiles@tintri.com>
Reviewed by: Guy Morrogh <gmorrogh@tintri.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r-- | usr/src/lib/fm/libfmd_agent/common/fmd_agent.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr/src/lib/fm/libfmd_agent/common/fmd_agent.c b/usr/src/lib/fm/libfmd_agent/common/fmd_agent.c index 928978fa17..62ec7cc331 100644 --- a/usr/src/lib/fm/libfmd_agent/common/fmd_agent.c +++ b/usr/src/lib/fm/libfmd_agent/common/fmd_agent.c @@ -129,12 +129,8 @@ fmd_agent_nvl_ioctl(fmd_agent_hdl_t *hdl, int cmd, uint32_t ver, if (errno == ENAMETOOLONG && outsz != 0 && outsz < (FM_IOC_OUT_MAXBUFSZ / 2)) { umem_free(outbuf, outsz); + outbuf = NULL; outsz *= 2; - outbuf = umem_alloc(outsz, UMEM_DEFAULT); - if (outbuf == NULL) { - err = errno; - break; - } } else { err = errno; break; |