Bug 19210

Summary: test/pdf2png.c:63: Mismatching allocation and deallocation: absolute
Product: cairo Reporter: dvice_null
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.9.1   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.