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:
---
Dependency tree / graph

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)
Blocks: 1247056
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 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 on attachment 8788015 [details]
Bug 1300446 - Check return value from GetCubebContext -

https://reviewboard.mozilla.org/r/76544/#review74684
Attachment #8788015 - Flags: review?(kinetik) → review+
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
You need to log in before you can comment on or make changes to this bug.