Use vector<char> instead of char* and malloc() for images

And fix the associated memory leaks in the process.

Test: fastboot works
Change-Id: I6e41f351ca6cebf79282d30b1eca1506496e0c21
7 files changed