Following Resource leak is reported by coverity:
CID 997011 (#1 of 1): Resource leak (RESOURCE_LEAK)6. leaked_storage:
Variable "buf" going out of scope leaks the storage it points to.
505 return(XR_EOF);
Add a free(buf) to solve it.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
do_warn(
_("error reading superblock %u -- seek to offset %" PRId64 " failed\n"),
agno, off);
+ free(buf);
return(XR_EOF);
}