Blender Git Commit Log

Git Commits -> Revision d97845a

Revision d97845a by Campbell Barton (master)
December 10, 2020, 05:56 (GMT)
BLI_string: return NULL from BLI_str_quoted_substrN on failure

This was returning an empty allocated string, however almost
all callers checked if the return value was NULL before freeing,
making for misunderstandings on the intended use of this function.

BCAnimationSampler::initialize_curves for example detected the
f-curves animation type to 'bone' based on a non-NULL return value
which never failed.

Also fixes two leaks where the the result of BLI_str_quoted_substrN
wasn't freed.

Commit Details:

Full Hash: d97845a693c28b8d56934c1b34bdb5c346a2603b
Parent Commit: 3ec7cf6
Lines Changed: +56, -55

10 Modified Paths:

/source/blender/blenlib/intern/string.c (+1, -1) (Diff)
/source/blender/editors/animation/anim_deps.c (+5, -3) (Diff)
/source/blender/editors/animation/anim_filter.c (+8, -11) (Diff)
/source/blender/editors/animation/anim_ipo_utils.c (+2, -1) (Diff)
/source/blender/editors/animation/keyframes_general.c (+6, -7) (Diff)
/source/blender/editors/animation/keyframing.c (+10, -13) (Diff)
/source/blender/editors/armature/pose_select.c (+1, -3) (Diff)
/source/blender/editors/transform/transform_convert_armature.c (+14, -14) (Diff)
/source/blender/io/collada/BCAnimationCurve.cpp (+8, -2) (Diff)
/source/blender/io/collada/BCAnimationSampler.cpp (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021