diff options
author | dbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-09-17 18:52:32 +0000 |
---|---|---|
committer | dbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-09-17 18:52:32 +0000 |
commit | 9655c5b093d459df001d7a11742d9a84183ce1f2 (patch) | |
tree | 6eb310f8dcb4fb0136d55a2ba6d099e648ab5db8 /src/helper | |
parent | 84f51bf50cfd2e93914b017533ef8c7f89982183 (diff) | |
download | riscv-openocd-9655c5b093d459df001d7a11742d9a84183ce1f2.zip riscv-openocd-9655c5b093d459df001d7a11742d9a84183ce1f2.tar.gz riscv-openocd-9655c5b093d459df001d7a11742d9a84183ce1f2.tar.bz2 |
Fix coredump seen in some code paths.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2723 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/jim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helper/jim.c b/src/helper/jim.c index aa6382a..d999c69 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -2828,6 +2828,9 @@ void FreeScriptInternalRep(Jim_Interp *interp, Jim_Obj *objPtr) int i; struct ScriptObj *script = (void*) objPtr->internalRep.ptr; + if (!script) + return; + script->inUse--; if (script->inUse != 0) return; for (i = 0; i < script->len; i++) { |