Re: [PATCH 2/5] osmtest.c: osmtest_create_inventory_file close fh before exit

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

 



On 8/27/2018 9:48 PM, Honggang LI wrote:
> From: Honggang Li <honli@xxxxxxxxxx>
> 
> Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
> ---
>  osmtest/osmtest.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/osmtest/osmtest.c b/osmtest/osmtest.c
> index 4ef78eb0..b7197bf3 100644
> --- a/osmtest/osmtest.c
> +++ b/osmtest/osmtest.c
> @@ -2736,9 +2736,8 @@ osmtest_create_inventory_file(IN osmtest_t * const p_osmt)
>  	if (status != IB_SUCCESS)
>  		goto Exit;
>  
> -	fclose(fh);
> -
>  Exit:
> +	fclose(fh);

This also closes file when not opened. Proposed patch to fix this to
follow shortly.

-- Hal

>  	OSM_LOG_EXIT(&p_osmt->log);
>  	return (status);
>  }
> 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux