Closed Bug 576375 Opened 15 years ago Closed 15 years ago

LayerManagerOGL::Initialize leaks p in SHADER_PROGRAM when p->Initialize fails

Categories

(Core :: Graphics, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file, 1 obsolete file)

105 LayerManagerOGL::Initialize(GLContext *aExistingContext) 134 #define SHADER_PROGRAM(penum, ptype, vsstr, fsstr) do { \ 135 NS_ASSERTION(programIndex++ == penum, "out of order shader initialization!"); \ 136 ptype *p = new ptype(mGLContext); \ 137 if (!p->Initialize(vsstr, fsstr)) \ p is leaked here: 138 return PR_FALSE; \ 148 SHADER_PROGRAM(RGBALayerProgramType, ColorTextureLayerProgram, 149 sLayerVS, sRGBATextureLayerFS); ?mark=148-149,134-138,136,137,138#105
This is gfx/layers code.
Component: Canvas: WebGL → Graphics
QA Contact: canvas.webgl → thebes
Attached patch Patch fixing this (obsolete) — Splinter Review
Thanks for your report, you basically did all the work... this tiny patch fixes it, doesn't it?
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
Attachment #455680 - Flags: review?(vladimir)
yeah, i filed a bunch and fell asleep before i got around to writing the patches for them. please note that the file is using two space indentation, so your patch isn't quite proper :/. I'm also moving the slashes on the right side because they're supposed to be aligned....
Assignee: bjacob → timeless
Attachment #455680 - Attachment is obsolete: true
Attachment #455683 - Flags: review?(vladimir)
Attachment #455680 - Flags: review?(vladimir)
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: