Open-PS2-Loader
Open-PS2-Loader copied to clipboard
Avoid potential memory leaks if memory fails to be allocated etc
Pull Request checklist
Note: these are not necessarily requirements
- [ ] I reformatted the code with clang-format
- [ ] I checked to make sure my submission worked
- [x] I am the author of submission or have permission from the original author
- [ ] Requires update of the PS2SDK or other dependencies
- [ ] Others (please specify below)
Pull Request description
Took a quick look at the cfg system to try determine why over time cfg files seem to become corrupt (sometimes?) and users need to delete them in order to boot OPL, it's hard to pinpoint the issue specifically so I don't know whether this will help or not but we should handle allocation failures to avoid memory leaks and null terminate strings so I'll open this anyway. Untested but shouldn't break anything.