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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user