From cb771cbdbdb153b68275cd5b9eca593c4e5026e8 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Thu, 24 Feb 2011 16:34:51 +0100 Subject: [PATCH] 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 --- drivers/staging/iio/Documentation/iio_utils.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h index 4dc961ced35..3cf01a532b5 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, -- 2.11.4.GIT