Closed Bug 565321 Opened 10 years ago Closed 10 years ago

nsGLPbufferEGL::Init always leaks XGetVisualInfo

Categories

(Core :: Canvas: WebGL, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 561168

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

172  	nsGLPbufferEGL::Init(mozilla::WebGLContext *priv)

245  	    XVisualInfo *vf = XGetVisualInfo(DISPLAY(), VisualIDMask, &vinfo, &pad);

308  	    if (!mGLWrap.OpenLibrary(GLES2_LIB)) {
310  	        return PR_FALSE;

314  	    if (!mGLWrap.Init(GLES20Wrap::TRY_NATIVE_GL)) {
316  	        return PR_FALSE;
319  	    return PR_TRUE;

Sample code:
http://www.codase.com/search/call?name=xgetvisualinfo&start=10

Visual *
get_visual(display, screen, depthp)
{
	XVisualInfo *best, *vinfo, vinfo_template;
	Visual *ret;
	vinfo = XGetVisualInfo(display, vinfo_mask, &vinfo_template, &ninfo);
...
	XFree(vinfo);
	return ret;
}
Blocks: 556850
Attached patch untestedSplinter Review
oleg: is this ok/does this work?
Assignee: nobody → timeless
Status: NEW → UNCONFIRMED
Ever confirmed: false
Attachment #444897 - Flags: review?(romaxa)
Comment on attachment 444897 [details] [diff] [review]
untested

This code is going away shortly (today or tomorrow) -- no need to patch it.
Attachment #444897 - Flags: review?(romaxa) → review-
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 561168
You need to log in before you can comment on or make changes to this bug.