* [PATCH] [prio] Memory leak if failed to do RTPG.
@ 2009-04-08 22:11 Konrad Rzeszutek
2010-11-03 20:53 ` Mike Snitzer
0 siblings, 1 reply; 2+ messages in thread
From: Konrad Rzeszutek @ 2009-04-08 22:11 UTC (permalink / raw)
To: dm-devel
We don't de-alloc the buf variable if we fail on the first
do_rtpg call.
---
libmultipath/prioritizers/alua_rtpg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
index 7151cdd..5a8a59f 100644
--- a/libmultipath/prioritizers/alua_rtpg.c
+++ b/libmultipath/prioritizers/alua_rtpg.c
@@ -263,7 +263,7 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
}
rc = do_rtpg(fd, buf, buflen);
if (rc < 0)
- return rc;
+ goto out;
scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
if (buflen < (scsi_buflen + 4)) {
free(buf);
--
1.5.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Memory leak if failed to do RTPG.
2009-04-08 22:11 [PATCH] [prio] Memory leak if failed to do RTPG Konrad Rzeszutek
@ 2010-11-03 20:53 ` Mike Snitzer
0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2010-11-03 20:53 UTC (permalink / raw)
To: device-mapper development; +Cc: Christophe Varoqui
This patch is still queued in dm-devel's patchwork and is still relevant
to upstream's multipath-tools:
https://patchwork.kernel.org/patch/17280/
On Wed, Apr 08 2009 at 6:11pm -0400,
Konrad Rzeszutek <konrad@virtualiron.com> wrote:
> We don't de-alloc the buf variable if we fail on the first
> do_rtpg call.
> ---
> libmultipath/prioritizers/alua_rtpg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
> index 7151cdd..5a8a59f 100644
> --- a/libmultipath/prioritizers/alua_rtpg.c
> +++ b/libmultipath/prioritizers/alua_rtpg.c
> @@ -263,7 +263,7 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
> }
> rc = do_rtpg(fd, buf, buflen);
> if (rc < 0)
> - return rc;
> + goto out;
> scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
> if (buflen < (scsi_buflen + 4)) {
> free(buf);
> --
> 1.5.4.1
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-03 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 22:11 [PATCH] [prio] Memory leak if failed to do RTPG Konrad Rzeszutek
2010-11-03 20:53 ` Mike Snitzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).