diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2012-07-01 00:38:34 +0200 |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2012-07-01 00:38:34 +0200 |
commit | 41f9d04e0661a3e6e8f8045497972e153f77af16 (patch) | |
tree | c044d28c9f0e6808e2efbdbc18a5952421962688 /Objects/exceptions.c | |
parent | 49a7da30aa823e634d2c7223d37ef93592304876 (diff) | |
parent | f87289bb58e71f5df73cbd594cbc0c0515e91c4b (diff) | |
download | cpython-git-41f9d04e0661a3e6e8f8045497972e153f77af16.tar.gz |
null merge
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index f706698499..5c85f10444 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -834,6 +834,7 @@ oserror_init(PyOSErrorObject *self, PyObject **p_args, #endif /* Steals the reference to args */ + Py_CLEAR(self->args); self->args = args; args = NULL; @@ -916,6 +917,11 @@ OSError_new(PyTypeObject *type, PyObject *args, PyObject *kwds) )) goto error; } + else { + self->args = PyTuple_New(0); + if (self->args == NULL) + goto error; + } return (PyObject *) self; |