Commit cb771cbd authored by Michael Hennerich's avatar Michael Hennerich Committed by Greg Kroah-Hartman

IIO: Documentation: iio_utils: Avoid double free()

filename is used and freed later
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 065896e9
......@@ -319,7 +319,6 @@ inline int build_channel_array(const char *device_dir,
}
fscanf(sysfsfp, "%u", &current->enabled);
fclose(sysfsfp);
free(filename);
current->scale = 1.0;
current->offset = 0;
current->name = strndup(ent->d_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment