This repository was archived by the owner on Dec 8, 2024. It is now read-only.
Correctly handle potential popen() failures #63
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe the commit descriptions are sufficient here :)
I had a look through the code earlier today, relevant discussion can be found on Google+: https://plus.google.com/u/0/+IkeyDoherty/posts/i7KeTu5hnRv
Realise it was quite possible you wouldn't see the post, so here are the relevant fixes.
Something I believe that does need addressing also however is your use of splitting strings.with your
str_replace
function. Please note that every time you call it, you have a newly allocated string returnedfrom the function which you need to free using
g_free()
.Essentially, you have a whole bunch of strings being allocated and not freed. (Also look at your use of
g_strdup
within the method, that's two allocated and never-freed strings hanging around (The memory itself is never free'd)If I have some time I might tackle this.
Hope this is somewhat helpful to you :)