IIO: Documentation: iio_utils: Avoid double free()
filename is used and freed later Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
065896e904
commit
cb771cbdbd
|
@ -319,7 +319,6 @@ inline int build_channel_array(const char *device_dir,
|
|||
}
|
||||
fscanf(sysfsfp, "%u", ¤t->enabled);
|
||||
fclose(sysfsfp);
|
||||
free(filename);
|
||||
current->scale = 1.0;
|
||||
current->offset = 0;
|
||||
current->name = strndup(ent->d_name,
|
||||
|
|
Loading…
Reference in New Issue