Note that it is OK to pass NULL pointers to this function since this commit:
mesa: modified _mesa_align_free() to accept NULL pointer
http://cgit.freedesktop.org/mesa/mesa/commit/?id=
f0cc59d68a9f5231e8e2111393a1834858820735
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(void) target;
- if (bufObj->Data)
- _mesa_align_free( bufObj->Data );
+ _mesa_align_free( bufObj->Data );
new_data = _mesa_align_malloc( size, ctx->Const.MinMapBufferAlignment );
if (new_data) {