data gets allocated before buffer_access, so it should be freed in reverse
order. Otherwise, if allocating buffer_access fails, an attempt to free it
would be taken, which should not happen.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
error_close_buffer_access:
close(fp);
-error_free_data:
- free(data);
error_free_buffer_access:
free(buffer_access);
+error_free_data:
+ free(data);
error_free_buf_dir_name:
free(buf_dir_name);
error_free_triggername: