diff options
-rw-r--r-- | Modules/shamodule.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/shamodule.c b/Modules/shamodule.c index 32ac02d..8bfcec7 100644 --- a/Modules/shamodule.c +++ b/Modules/shamodule.c @@ -491,16 +491,15 @@ SHA_new(PyObject *self, PyObject *args, PyObject *kwdict) SHAobject *new; unsigned char *cp = NULL; int len; - - if ((new = newSHAobject()) == NULL) - return NULL; if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, &cp, &len)) { - Py_DECREF(new); return NULL; } + if ((new = newSHAobject()) == NULL) + return NULL; + sha_init(new); if (PyErr_Occurred()) { |