[Mesa-dev] [Bug 96480] possible memory leak in mipmap.c

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 10 11:01:43 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=96480

            Bug ID: 96480
           Summary: possible memory leak in mipmap.c
           Product: Mesa
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: GLU
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: amarnath.valluri at gmail.com
        QA Contact: mesa-dev at lists.freedesktop.org

There is a possible memory leak in function gluBuild2DMipmapLevelsCore() in
case of OUT_OF_MEMORY

void *newMipmapImage= malloc((size_t) (newRowLength*newheight));
if (newMipmapImage == NULL) {
      glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
       glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
       glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
       glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
       glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes);
       return GLU_OUT_OF_MEMORY;
}

In this case memory allocated for both 'srcImage' and 'dstImage' is leaked.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160610/b393a9d0/attachment.html>


More information about the mesa-dev mailing list