Bug 19210 - test/pdf2png.c:63: Mismatching allocation and deallocation: absolute
Summary: test/pdf2png.c:63: Mismatching allocation and deallocation: absolute
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.9.1
Hardware: All All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-20 11:21 UTC by dvice_null
Modified: 2008-12-20 11:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description dvice_null 2008-12-20 11:21:49 UTC
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/
Comment 1 Chris Wilson 2008-12-20 11:30:20 UTC
Fixed in local tree.

Thanks for all the reports.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.