New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plug a few memory leaks #1499
Plug a few memory leaks #1499
Conversation
getFontForgeUserDir() allocates memory or returns NULL. The NULL case is already handled, free the memory otherwise. CR-fixed: 1225170
gwwv_ask_string is an alias to GWidgetAskString8 which uses the allocating u2utf8_copy() internally. If ret is non-null, free it at the end of the block. CR-fixed: 1225167.
WordlistLoadFileToGTextInfo allocates or returns 0. The zero case is already handled, so free **words otherwise at the end.
CR-fixed: 1225160.
By the way we should run GNU Indent through the entire codebase because right now it's kind of a pain to work with existing code. |
On 11 July 2014 08:53, Adrien Tétar notifications@github.com wrote:
There's been some protest against that as it would lose |
You can ignore whitespace change in blame with the |
At this point in the function, glyphdir hasn't been initialized. Don't try to free it.
I think I'll leave this one to you. The credit is all yours. Viewing the large number of edits, I'm guessing you're finding the scan both interesting and useful. ;-) |
There's also a lot of overruns and memory corruptions listed there, like 30 of them or so... it's real bad. |
BTW Frank Trampe has requested that all pull requests be actively reviewed I've updated the CONTRIBUTING.md file to make this clearer: |
Good to know. |
I have reviewed the now-merged changes, and I find them entirely to my liking. |
…and fix indent along the way.
Diff without whitespace
r? @JoesCat