[cairo-bugs] [Bug 19210] New: test/pdf2png.c:63: Mismatching allocation and deallocation : absolute

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 20 11:21:51 PST 2008


http://bugs.freedesktop.org/show_bug.cgi?id=19210

           Summary: test/pdf2png.c:63: Mismatching allocation and
                    deallocation: absolute
           Product: cairo
           Version: 1.9.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: dvice_null at yahoo.com
         QAContact: cairo-bugs at cairographics.org


In latest git version. 

In file test/pdf2png.c:63: 
Variable absolute is allocated with:
absolute = g_strdup (filename);

And later released with:
free (absolute);

You should use g_free() (could not found documentation, but there is this bug
report where it is said so).
http://bugzilla.gnome.org/show_bug.cgi?id=564794

I don't normally report bugs in test files, but I made an exception as result
of this bug could be undefined behavior, which is not good in testing either. 

This bug was found using cppcheck: http://cppcheck.wiki.sourceforge.net/


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list