Prevent a coredump seen in some code paths.
---
There may be other such bugs ... I didn't audit the code to
find them. Does someone own pushing such fixes upstream?
src/helper/jim.c | 3 +++
1 file changed, 3 insertions(+)
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -2828,6 +2828,9 @@ void FreeScriptInternalRep(Jim_Interp *i
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++) {
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development