diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-08-24 07:53:46 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-08-24 07:53:46 +0000 |
commit | bf5f21e39a6c04c3845dc61becc90d8602546290 (patch) | |
tree | 49de21fa0af834ac6b91bfde83280e87ae24d318 /src/helper | |
parent | 332c8d78d8007e810380d4d0d13a4d47b8fb4d52 (diff) | |
download | openocd+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/helper')
-rw-r--r-- | src/helper/command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 2737a7b2..d93020e9 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -117,6 +117,10 @@ static int script_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) words[i] = strdup(w); if (words[i] == NULL) { + int j; + for (j = 0; j < i; j++) + free(words[j]); + free(words); return JIM_ERR; } } |