Closed Bug 361608 Opened 19 years ago Closed 19 years ago

possible leak in Safari profile migrator

Categories

(Firefox :: Migration, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3 alpha1

People

(Reporter: Gavin, Assigned: asaf)

Details

(Keywords: memory-leak)

Attachments

(1 file, 1 obsolete file)

This is related to bug 344284: if ParseBookmarksFolder fails, we return early without calling ::CFRelease(safariBookmarks). Doesn't this leak safariBookmarks? Should we have helper classes to hold these objects and avoid the manual refcounting (like webkit's RetainPtr)?
more related to bug #361624. thanks for spotting this and logging it, gavin.
Assignee: nobody → mano
Attached patch patch (obsolete) — Splinter Review
Attachment #246568 - Flags: review?(mark)
Comment on attachment 246568 [details] [diff] [review] patch |return rv| will return an uninitialized value if: - MOZ_PLACES_BOOKMARKS is not defined - aReplace is true - some other failure occurs before reaching ParseBookmarksFolder I suggest explicit initialization of rv in the !defined(MOZ_PLACES_BOOKMARKS ) code by using the two-argument form of do_GetService both times, adding NS_ENSURE_SUCCESS, and getting rid of NS_ENSURE_TRUE. You can choose an alternate reasonable solution to the problem if you like something else better.
Attachment #246568 - Flags: review?(mark) → review+
Attached patch patchSplinter Review
Attachment #246568 - Attachment is obsolete: true
mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp 1.34
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 alpha1
Attachment #246568 - Flags: approval1.8.1.2?
Attachment #246568 - Flags: approval1.8.1.2?
Attachment #246896 - Flags: approval1.8.1.2?
Comment on attachment 246896 [details] [diff] [review] patch Not critical for 2.0.0.2, maybe next time.
Attachment #246896 - Flags: approval1.8.1.2? → approval1.8.1.2-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: