From bf5f21e39a6c04c3845dc61becc90d8602546290 Mon Sep 17 00:00:00 2001 From: oharboe Date: Mon, 24 Aug 2009 07:53:46 +0000 Subject: Steve Grubb fix various and sundry leaks git-svn-id: svn://svn.berlios.de/openocd/trunk@2606 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/command.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/helper') 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; } } -- cgit v1.2.3