On 01.12.2015 15:35, Alberto Garcia wrote:
> On Tue 10 Nov 2015 04:44:18 AM CET, Max Reitz wrote:
>> -int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp)
>> +static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs,
>> +                                                   int flags, Error **errp)
>>  {
>>      /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
>>      char *tmp_filename = g_malloc0(PATH_MAX + 1);
>> @@ -1354,11 +1355,15 @@ int bdrv_append_temp_snapshot(BlockDriverState *bs, 
>> int flags, Error **errp)
>>          goto out;
>>      }
>>  
>> +    bdrv_ref(bs_snapshot);
>>      bdrv_append(bs_snapshot, bs);
>>  
>> +    g_free(tmp_filename);
>> +    return bs_snapshot;
>> +
>>  out:
>>      g_free(tmp_filename);
>> -    return ret;
>> +    return NULL;
>>  }
> 
> If I'm not wrong, now that you're not returning 'ret' anymore there's a
> "ret = total_size" line earlier in this function that is useless now.

Yes, indeed, thanks for finding that. Will fix.

Max

> Other than that,
> 
> Reviewed-by: Alberto Garcia <be...@igalia.com>
> 
> Berto
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to