IIO: Documentation: iio_utils: Avoid double free()
authorMichael Hennerich <michael.hennerich@analog.com>
Thu, 24 Feb 2011 15:34:51 +0000 (16:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 28 Feb 2011 22:40:22 +0000 (14:40 -0800)
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>
drivers/staging/iio/Documentation/iio_utils.h

index 4dc961ced35e2b7791f3e88afe69da386162aeef..3cf01a532b555ecb8171dc3e2863f58ff0f54bdf 100644 (file)
@@ -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,