Re: [PATCH] Coverity: Resource leak: close fd before return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/07/18 18:07, Jes Sorensen wrote:
> On 06/15/2018 05:36 PM, Anthony Youngman wrote:
>> ---
>>  Grow.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Grow.c b/Grow.c
>> index a4be7e7..30c5fa9 100644
>> --- a/Grow.c
>> +++ b/Grow.c
>> @@ -242,6 +242,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
>>  		if (st->ss->load_super(st, fd2, NULL)) {
>>  			pr_err("cannot find super block on %s\n", dv);
>>  			close(fd);
>> +			close(fd2);
>>  			return 1;
>>  		}
>>  		info.array.raid_disks = nd+1;
>>
> 
> So I just realized you're not adding the obligatory Signed-off-by: line,
> please make sure to do this in the future, and I'll fix these ones up.
> 
Okay thanks.

I'm steadily learning all this stuff :-) I've added format.signoff to my
config, so hopefully it will do it by default now?

Cheers,
Wol

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux