[ODE] memory leak from redundant allocation in dBodyCreate
Riley Lark
rileylark at gmail.com
Sun Dec 3 09:55:35 MST 2006
I would fix this myself, but I am extremely wary of my SVN skills:
in dBodyCreate on line 254 of ode.cpp, dBodySetAutoDisableDefaults is
called. This eventually gets to line 909 and 910 of ode.cpp which, if
adis.average_samples > 0, allocate space for the samples.
Then control returns to dBodyCreate which, on line 261 of ode.cpp,
allocates space for the samples again.
I fixed this error by checking to make sure average_lvel_buffer and
average_avel_buffer are still NULL just before allocating them in
dBodyCreate.
More information about the ODE
mailing list