[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH 12/14] block/vvfat: Plug memory le
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH 12/14] block/vvfat: Plug memory leak in read_directory() |
Date: |
Tue, 27 May 2014 18:18:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 05/26/2014 11:37 AM, Markus Armbruster wrote:
>> Has always been leaky. Spotted by Coverity.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> block/vvfat.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/block/vvfat.c b/block/vvfat.c
>> index 2c82a5c..389704a 100644
>> --- a/block/vvfat.c
>> +++ b/block/vvfat.c
>> @@ -787,7 +787,9 @@ static int read_directory(BDRVVVFATState* s, int
>> mapping_index)
>> s->current_mapping->path=buffer;
>> s->current_mapping->read_only =
>> (st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0;
>> - }
>> + } else {
>
> Looks odd to have TAB here,
>
>> + g_free(buffer);
>> + }
>
> but not here
I'll expand the tab when I respin. Thanks!
- [Qemu-stable] [PATCH 06/14] qemu-io: Plug memory leak in open command, (continued)
- [Qemu-stable] [PATCH 06/14] qemu-io: Plug memory leak in open command, Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 08/14] blockdev: Plug memory leak in blockdev_init(), Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 13/14] block/sheepdog: Plug memory leak in sd_snapshot_create(), Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 12/14] block/vvfat: Plug memory leak in read_directory(), Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 11/14] block/vvfat: Plug memory leak in check_directory_consistency(), Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 01/14] qemu-img: Plug memory leak on block option help error path, Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 03/14] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths, Markus Armbruster, 2014/05/26
- [Qemu-stable] [PATCH 05/14] qemu-io: Support multiple -o in open command, Markus Armbruster, 2014/05/26