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
This commit is contained in:
oharboe
2009-08-24 07:53:46 +00:00
parent 332c8d78d8
commit bf5f21e39a
7 changed files with 39 additions and 0 deletions

View File

@@ -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;
}
}