diff options
author | Konrad Rzeszutek <konrad@virtualiron.com> | 2010-11-03 23:13:02 +0100 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@opensvc.com> | 2010-11-03 23:13:02 +0100 |
commit | 66399f0d8d137abbb2d9bf818e1282588bc97dae (patch) | |
tree | ca21356e19427eda9bc38571845c94feb60cbf42 | |
parent | 2c4f33617b9fa92e0f9e622df1c5269247921017 (diff) | |
download | multipath-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.c | 2 |
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); |