[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 2/2] msi: Don't leak memory on failure.
From: Nikolay Sivov <bunglehead () gmail ! com>
Date: 2017-10-22 9:21:08
Message-ID: dc75315b-b709-1d3c-25e7-a16960423bef () gmail ! com
[Download RAW message or body]
On 22.10.2017 12:15, Pierre Schweitzer wrote:
> Hi Nikolay,
>
> Thanks for your review. I'm not really keen on mixing success and
> failure path that way for quick understanding of the code.
> Shall I really rewrite the patch the way you asked or was it just a
> proposal?
No, you don't have to do anything just yet, wait for maintainer comment.
>
> Cheers,
> Pierre
>
> Le 21/10/2017 à 12:16, Nikolay Sivov a écrit :
>> On 21.10.2017 12:50, Pierre Schweitzer wrote:
>>> row = MSI_CreateRecord(1);
>>> if (!row)
>>> + {
>>> + msi_free(buffer);
>>> return NULL;
>>> + }
>>> MSI_RecordSetStringW(row, 1, buffer);
>>> msi_free(buffer);
>>> return row;
>>
>> You can replace this with:
>>
>> ---
>> row = MSI_CreateRecord(1);
>> if (row)
>> MSI_RecordSetStringW(row, 1, buffer);
>> msi_free(buffer);
>> return row;
>> ---
>>
>>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic