Merge lp://qastaging/~gue5t/midori/extension-tests into lp://qastaging/midori

Proposed by gue5t gue5t
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 7094
Merged at revision: 7099
Proposed branch: lp://qastaging/~gue5t/midori/extension-tests
Merge into: lp://qastaging/midori
Diff against target: 173 lines (+48/-17)
2 files modified
midori/midori-extension.c (+2/-2)
tests/extensions.c (+46/-15)
To merge this branch: bzr merge lp://qastaging/~gue5t/midori/extension-tests
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+283894@code.qastaging.launchpad.net

Commit message

Fix memory leaks and logic errors in extension loading and tests

Description of the change

In tests/extensions.c, there are lots of leaks which are fixed with the appropriate unref calls. extension_load is changed to return the extension it loads, so it can be freed. In addition, extension_load is changed to only register the tests when told to do so, because extension_load is called twice to exercise loading an extension multiple times--but GLib does not allow registering the same test twice. This is a correctness fix, and without it running "./tests/extensions -e ./extensions/libYOURFAVORITEEXTENSION.so" fails with a GLib error for every extension.

tests/extension.c also had a few misleading variable names which have been fixed.

In midori/midori-extension.c there's a memory leak where setting->name was only being freed for String or StringList settings, and the setting struct itself was never being freed. These leaks are fixed.

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: