summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-02-08 09:33:24 (GMT)
committerhobbs <hobbs>2002-02-08 09:33:24 (GMT)
commit0cc0da11ade0c01bfb84c79316082347a1308ea8 (patch)
treedb7b006c085a87b4c113669bd3b6117c4fb9607a
parent7946e043840cfab27940a93f7647d136eda8b6d4 (diff)
downloadtcl-0cc0da11ade0c01bfb84c79316082347a1308ea8.zip
tcl-0cc0da11ade0c01bfb84c79316082347a1308ea8.tar.gz
tcl-0cc0da11ade0c01bfb84c79316082347a1308ea8.tar.bz2
* generic/tclScan.c (Tcl_ScanObjCmd): prevented ckfree being
called on a pointer to NULL.
-rw-r--r--generic/tclScan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 4dea57a..d631116 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclScan.c,v 1.9 2002/02/07 01:50:46 hobbs Exp $
+ * RCS: @(#) $Id: tclScan.c,v 1.10 2002/02/08 09:33:24 hobbs Exp $
*/
#include "tclInt.h"
@@ -1124,7 +1124,9 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv)
}
}
}
- ckfree((char*) objs);
+ if (objs != NULL) {
+ ckfree((char*) objs);
+ }
if (code == TCL_OK) {
if (underflow && (nconversions == 0)) {
if (numVars) {