Avoid zeroing out memory when not required
The only time the internal buffer cleanup code was called was just
before freeing the entire context, so individually zeroing out the
members is pointless. Remove the function entirely and inline the
buffer freeing into the context cleanup codepath.
For zeroing the error buffer, it's only called right after allocating
the error buffer with palloc0() in the first place so the memory will
always be zeroed out when reaching here.
Reviewed-by: NFrancisco Guerrero <aguerrero@pivotal.io>
Showing
想要评论请 注册 或 登录