Check cubeb_init so that a null context is not actually used

RESOLVED FIXED in Firefox 51

Status

()

defect
P3
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: gerald, Assigned: gerald)

Tracking

50 Branch
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(3 attachments)

cubeb_init could potentially return a null pointer if it hasn't found any usable backend.
Even through other cubeb functions that take a context do check for a null pointer (and return an appropriate error code), it is poor form: We should check for null pointers before forwarding them to other functions.

(Original suggestion by :kinetik)
Comment hidden (mozreview-request)

Comment 4

3 years ago
mozreview-review
Comment on attachment 8788013 [details]
Bug 1300446 - Keep explicit cubeb state -

https://reviewboard.mozilla.org/r/76540/#review74680
Attachment #8788013 - Flags: review?(kinetik) → review+

Comment 5

3 years ago
mozreview-review
Comment on attachment 8788014 [details]
Bug 1300446 - Check return value from GetCubebContextUnlocked -

https://reviewboard.mozilla.org/r/76542/#review74682
Attachment #8788014 - Flags: review?(kinetik) → review+

Comment 6

3 years ago
mozreview-review
Comment on attachment 8788015 [details]
Bug 1300446 - Check return value from GetCubebContext -

https://reviewboard.mozilla.org/r/76544/#review74684
Attachment #8788015 - Flags: review?(kinetik) → review+

Comment 7

3 years ago
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c3b79bc8557c
Keep explicit cubeb state - r=kinetik
https://hg.mozilla.org/integration/autoland/rev/f0a2a1052c7f
Check return value from GetCubebContextUnlocked - r=kinetik
https://hg.mozilla.org/integration/autoland/rev/03056868056e
Check return value from GetCubebContext - r=kinetik

Comment 8

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c3b79bc8557c
https://hg.mozilla.org/mozilla-central/rev/f0a2a1052c7f
https://hg.mozilla.org/mozilla-central/rev/03056868056e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.