From: Michael Hennerich Date: Thu, 24 Feb 2011 15:34:51 +0000 (+0100) Subject: IIO: Documentation: iio_utils: Avoid double free() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cb771cbdbdb153b68275cd5b9eca593c4e5026e8;p=linux-beck.git IIO: Documentation: iio_utils: Avoid double free() filename is used and freed later Signed-off-by: Michael Hennerich Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index 4dc961ced35e..3cf01a532b55 100644 --- a/drivers/staging/iio/Documentation/iio_utils.h +++ b/drivers/staging/iio/Documentation/iio_utils.h @@ -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,