FontInstance.cpp: Mismatching allocation and deallocation: res

Bug #812413 reported by Reijo Tomperi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Johan Engelen

Bug Description

[../inkscape/inkscape/src/libnrtype/FontInstance.cpp:388]: (error) Mismatching allocation and deallocation: res
(revision 10464)

res is allocated with:
res = g_strdup_printf ("%s%s%s%s",

And deallocated with:
free(res)

According to the manual g_free() should be used instead:
http://developer.gnome.org/glib/2.28/glib-String-Utility-Functions.html#g-strdup-printf
"The returned string should be freed with g_free() when no longer needed."

Tags: cppcheck
Revision history for this message
Johan Engelen (johanengelen) wrote :

thanks for reviewing the code so precisely. Fix committed. (trunk r10468, 0.48.x r9821)

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
milestone: none → 0.48.3
status: New → Fix Committed
su_v (suv-lp)
tags: added: cppcheck
jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Low
Ted Gould (ted)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.