these are patches for several issues found by cppcheck:
[inkscape/buildtool.cpp:5217]: (error) Resource leak: srcf
[inkscape/src/2geom/path-intersection.cpp:122]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:123]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:127]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:129]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:489]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:490]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:492]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/bind/javabind.cpp:1060]: (error) Mismatching allocation and deallocation: jvals
[inkscape/src/bind/javabind.cpp:1013]: (error) Memory leak: jvals
[inkscape/src/bind/javabind.cpp:1181]: (error) Mismatching allocation and deallocation: jvals
[inkscape/src/bind/javabind.cpp:1134]: (error) Memory leak: jvals
[inkscape/src/dom/util/ziptool.cpp:2210]: (possible error) Memory leak: ze
[inkscape/src/extension/dxf2svg/entities2elements.cpp:92]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:118]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:197]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:224]: (error) Buffer access out-of-bounds
[inkscape/src/extension/internal/emf-win32-inout.cpp:130]: (error) Memory leak: oldoutput
[inkscape/src/extension/internal/odf.cpp:798]: (error) Mismatching allocation and deallocation: e
[inkscape/src/extension/internal/odf.cpp:799]: (error) Mismatching allocation and deallocation: work
[inkscape/src/extension/internal/pdfinput/pdf-input.cpp:741]: (possible error) Memory leak: dlg
[inkscape/src/extension/internal/pdfinput/svg-builder.cpp:1539]: (error) Mismatching allocation and deallocatio
n: buffer
[inkscape/src/extension/internal/pdfinput/svg-builder.cpp:1578]: (error) Mismatching allocation and deallocatio
n: buffer
[inkscape/src/extension/param/description.h:23]: (possible error) Memory leak: ParamDescription::_value
[inkscape/src/inkjar/jar.cpp:84]: (error) Mismatching allocation and deallocation: JarFile::_filename
[inkscape/src/libcroco/cr-cascade.c:74]: (error) Memory leak: result
I build tested the patches only on linux, so I probably didnt cover everything during compilation.