FileUtil.copy() relies on IOUtils.copyBytes() to close the incoming streams, which it does. Normally.
But if dstFS.create() raises any kind of IOException, then the inputstream "in", which was created in the line above, will never get closed, and hence be leaked.
InputStream in = srcFS.open(src);
OutputStream out = dstFS.create(dst, overwrite);
IOUtils.copyBytes(in, out, conf, true);
Some try/catch wrapper around the open operations could close the streams if any exception gets thrown at that point in the copy process.