projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71bfb4
)
tools:iio:generic_buffer: free dev_dir_name on exit
author
Hartmut Knaack
<knaack.h@gmx.de>
Sun, 31 May 2015 12:39:42 +0000
(14:39 +0200)
committer
Jonathan Cameron
<jic23@kernel.org>
Sun, 31 May 2015 16:14:37 +0000
(17:14 +0100)
Make sure to free dev_dir_name in case of an error or regular exit.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/generic_buffer.c
patch
|
blob
|
history
diff --git
a/tools/iio/generic_buffer.c
b/tools/iio/generic_buffer.c
index 15f2a40c9bf730f08bc4943bce07d027acc820cd..7859ee9a46b22fb1ad325a9b7edd3bd150fda3cc 100644
(file)
--- a/
tools/iio/generic_buffer.c
+++ b/
tools/iio/generic_buffer.c
@@
-220,7
+220,7
@@
int main(int argc, char **argv)
"%s-dev%d", device_name, dev_num);
if (ret < 0) {
ret = -ENOMEM;
- goto error_
ret
;
+ goto error_
free_dev_dir_name
;
}
}
@@
-354,6
+354,8
@@
error_free_buf_dir_name:
error_free_triggername:
if (datardytrigger)
free(trigger_name);
+error_free_dev_dir_name:
+ free(dev_dir_name);
error_ret:
return ret;
}