diff options
author | dgp <dgp@users.sourceforge.net> | 2019-07-01 19:21:06 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2019-07-01 19:21:06 (GMT) |
commit | f1465c3c89d7d822afbb8d554c33c0d198de57db (patch) | |
tree | 299e8fa11c414b7d299208637eb88ead6c158136 /generic/tclHash.c | |
parent | f53e74c9753ead43330abc3e6cc08c79fcc7ac1c (diff) | |
download | tcl-f1465c3c89d7d822afbb8d554c33c0d198de57db.zip tcl-f1465c3c89d7d822afbb8d554c33c0d198de57db.tar.gz tcl-f1465c3c89d7d822afbb8d554c33c0d198de57db.tar.bz2 |
Avoid valgrind issues with "uninitialized memory"
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r-- | generic/tclHash.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c index c2fc8ec..02a16a0 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -853,6 +853,7 @@ AllocStringEntry( allocsize = sizeof(hPtr->key); } hPtr = (Tcl_HashEntry *) ckalloc(sizeof(Tcl_HashEntry) + allocsize - sizeof(hPtr->key)); + memset(hPtr, 0, sizeof(Tcl_HashEntry) + allocsize - sizeof(hPtr->key)); memcpy(hPtr->key.string, string, size); hPtr->clientData = 0; return hPtr; |