tools:iio:iio_utils: move up reset of sysfsfp
In iioutils_get_type() it is logically better fitting to have sysfsfp assigned zero right after closing it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
33ebcb21a6
commit
ace76e42bc
|
@ -175,10 +175,10 @@ int iioutils_get_type(unsigned *is_signed,
|
|||
goto error_free_filename;
|
||||
}
|
||||
|
||||
sysfsfp = 0;
|
||||
free(filename);
|
||||
|
||||
filename = 0;
|
||||
sysfsfp = 0;
|
||||
}
|
||||
error_close_sysfsfp:
|
||||
if (sysfsfp)
|
||||
|
|
Loading…
Reference in a new issue