Skip to content

Commit

Permalink
IIO: Documentation: iio_utils: Avoid double free()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Feb 28, 2011
1 parent 065896e commit cb771cb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/iio/Documentation/iio_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cb771cb

Please sign in to comment.