Modify code to use VIR_AUTOFREE macro wherever required.
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr(a)gmail.com>
---
src/util/virfdstream.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c
index e4973a2..e7befbc 100644
--- a/src/util/virfdstream.c
+++ b/src/util/virfdstream.c
@@ -431,7 +431,7 @@ virFDStreamThreadDoRead(virFDStreamDataPtr fdst,
virFDStreamMsgPtr msg = NULL;
int inData = 0;
long long sectionLen = 0;
- char *buf = NULL;
+ VIR_AUTOFREE(char *) buf = NULL;
ssize_t got;
if (sparse && *dataLen == 0) {
@@ -496,7 +496,6 @@ virFDStreamThreadDoRead(virFDStreamDataPtr fdst,
return got;
error:
- VIR_FREE(buf);
virFDStreamMsgFree(msg);
return -1;
}
--
1.8.3.1