Closed Bug 1708339 Opened 4 years ago Closed 4 years ago

uninitalised member in nsDMABufDevice

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: pbone, Assigned: pbone)

Details

Attachments

(1 file)

A member is uninitalised in nsDMABufDevice, this was identified by Coveritly:


*** CID 1467668: Uninitialized members (UNINIT_CTOR)
/widget/gtk/DMABufLibWrapper.cpp: 185 in mozilla::widget::nsDMABufDevice::nsDMABufDevice()()
179 wl_display* display = WaylandDisplayGetWLDisplay();
180 mRegistry = (void*)wl_display_get_registry(display);
181 wl_registry_add_listener((wl_registry*)mRegistry, &registry_listener, this);
182 wl_display_roundtrip(display);
183 wl_display_roundtrip(display);
184 }

CID 1467668:  Uninitialized members  (UNINIT_CTOR)
Non-static class member "mRegistry" is not initialized in this constructor nor in any functions that it calls.

185 }
186
187 nsDMABufDevice::~nsDMABufDevice() {
188 if (mRegistry) {
189 wl_registry_destroy((wl_registry*)mRegistry);
190 mRegistry = nullptr;

This was only initialised if the if branch was entered in the constructor.

Assignee: nobody → pbone
Status: NEW → ASSIGNED
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7f79cf8568e7 Always initalise nsDMABufDevice::mRegistry r=stransky
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: