summaryrefslogtreecommitdiff
path: root/src/stream_template.c
diff options
context:
space:
mode:
authorakuchling <akuchling@rivest.dlitz.net>2002-05-23 14:10:22 -0700
committerakuchling <akuchling@rivest.dlitz.net>2002-05-23 14:10:22 -0700
commit8d96114763ba9aca08c99a234562bd00933f61c1 (patch)
tree87eb98b0e0f7630cae57a3be9af1c3cc7dafabff /src/stream_template.c
parent756116d7c639c53ecbe4da2c5c276875e4c646a0 (diff)
downloadpycrypto-8d96114763ba9aca08c99a234562bd00933f61c1.tar.gz
[project @ akuchling-20020523211022-16b9d8b39f46fb87]
[project @ 2002-05-23 14:10:21 by akuchling] Use memset() in deallocators
Diffstat (limited to 'src/stream_template.c')
-rw-r--r--src/stream_template.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/stream_template.c b/src/stream_template.c
index 325dc44..24a8dfb 100644
--- a/src/stream_template.c
+++ b/src/stream_template.c
@@ -57,12 +57,8 @@ newALGobject(void)
static void
ALGdealloc(PyObject *ptr)
{
- int i;
- char *obj=(char *)ptr;
-
- /* Overwrite the contents of the object, just in case... */
- for (i = 0; i < sizeof(ALGobject); i++)
- *(obj + i) = '\0';
+ /* Overwrite the contents of the object */
+ memset((char *)ptr, 0, sizeof(ALGobject));
PyObject_DEL(ptr);
}