Closed Bug 1300446 Opened 4 years ago Closed 4 years ago

Check cubeb_init so that a null context is not actually used

Categories

(Core :: Audio/Video: cubeb, defect, P3)

50 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: gerald, Assigned: gerald)

References

Details

Attachments

(3 files)

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.