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:
Hartmut Knaack 2015-05-31 14:40:20 +02:00 committed by Jonathan Cameron
parent 33ebcb21a6
commit ace76e42bc
1 changed files with 1 additions and 1 deletions

View File

@ -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)