I have just published SNAPSHOTS with fixes for both the image and s3 extensions, which should solve these resource leaks
Details in the tickets
3.0.0.7-SNAPSHOT (v7) 2.0.0.32-SNAPSHOT (v6)
2.0.3.1-SNAPSHOT