summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-03-27 23:50:53 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-03-27 23:51:30 +0200
commit68bd107c6db941ec7b22f3e491e314041a95224b (patch)
tree1f7c69602a2b7637e6e760484a9fa7e87e8c6106 /src/helper
parentdec80e1cffa162ba0e1cd8e6ee66c7784fe79b87 (diff)
downloadopenocd+libswd-68bd107c6db941ec7b22f3e491e314041a95224b.tar.gz
openocd+libswd-68bd107c6db941ec7b22f3e491e314041a95224b.tar.bz2
openocd+libswd-68bd107c6db941ec7b22f3e491e314041a95224b.tar.xz
openocd+libswd-68bd107c6db941ec7b22f3e491e314041a95224b.zip
command: fix leak when executing commands
found via valgrind, not observed/reported. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/command.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 85d9463d..b00a2312 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -723,6 +723,7 @@ int command_run_linef(struct command_context *context, const char *format, ...)
if (string != NULL)
{
retval = command_run_line(context, string);
+ free(string);
}
va_end(ap);
return retval;