aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Rzeszutek <konrad@virtualiron.com>2010-11-03 23:13:02 +0100
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2010-11-03 23:13:02 +0100
commit66399f0d8d137abbb2d9bf818e1282588bc97dae (patch)
treeca21356e19427eda9bc38571845c94feb60cbf42
parent2c4f33617b9fa92e0f9e622df1c5269247921017 (diff)
downloadmultipath-tools-66399f0d8d137abbb2d9bf818e1282588bc97dae.tar.gz
de-alloc the buf variable if we fail on the first do_rtpg call
-rw-r--r--libmultipath/prioritizers/alua_rtpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
index 0531052..b85cfdf 100644
--- a/libmultipath/prioritizers/alua_rtpg.c
+++ b/libmultipath/prioritizers/alua_rtpg.c
@@ -266,7 +266,7 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
memset(buf, 0, buflen);
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]) + 4;
if (buflen < scsi_buflen) {
free(buf);