[Mesa-dev] [PATCH 1/8] mesa: check for allocation failures in _mesa_new_texture_object()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 7 07:14:00 UTC 2017



On 07/06/2017 08:06 PM, Andres Gomez wrote:
> It looks like we could want patches 1 and 3-8 from this series into
> -stable (?)

These are not critical fixes, your call.

> 
> On Wed, 2017-06-21 at 11:04 +0200, Samuel Pitoiset wrote:
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>   src/mesa/main/texobj.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
>> index 1877262ed65..ed1eaf9b77b 100644
>> --- a/src/mesa/main/texobj.c
>> +++ b/src/mesa/main/texobj.c
>> @@ -234,11 +234,14 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
>>    * \return pointer to new texture object.
>>    */
>>   struct gl_texture_object *
>> -_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target )
>> +_mesa_new_texture_object(struct gl_context *ctx, GLuint name, GLenum target)
>>   {
>>      struct gl_texture_object *obj;
>> -   (void) ctx;
>> +
>>      obj = MALLOC_STRUCT(gl_texture_object);
>> +   if (!obj)
>> +      return NULL;
>> +
>>      _mesa_initialize_texture_object(ctx, obj, name, target);
>>      return obj;
>>   }


More information about the mesa-dev mailing list