summaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-24 07:53:46 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-24 07:53:46 +0000
commitbf5f21e39a6c04c3845dc61becc90d8602546290 (patch)
tree49de21fa0af834ac6b91bfde83280e87ae24d318 /src/svf
parent332c8d78d8007e810380d4d0d13a4d47b8fb4d52 (diff)
downloadopenocd+libswd-bf5f21e39a6c04c3845dc61becc90d8602546290.tar.gz
openocd+libswd-bf5f21e39a6c04c3845dc61becc90d8602546290.tar.bz2
openocd+libswd-bf5f21e39a6c04c3845dc61becc90d8602546290.tar.xz
openocd+libswd-bf5f21e39a6c04c3845dc61becc90d8602546290.zip
Steve Grubb <sgrubb@redhat.com> fix various and sundry leaks
git-svn-id: svn://svn.berlios.de/openocd/trunk@2606 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/svf')
-rw-r--r--src/svf/svf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index 510b7b0a..16495ac1 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -1322,6 +1322,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
if (!svf_tap_state_is_valid(path[i]))
{
LOG_ERROR("%s is not valid state", svf_tap_state_name[path[i]]);
+ free(path);
return ERROR_FAIL;
}
if (TAP_RESET == path[i])
@@ -1348,6 +1349,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
else
{
LOG_ERROR("%s is not valid state", svf_tap_state_name[path[num_of_argu - 1]]);
+ free(path);
return ERROR_FAIL;
}
}