fix segfault in photon.Task (#253)

This commit is contained in:
Philipp Moritz authored and Robert Nishihara committed 2017-02-07 11:17:11 -08:00
1 parent 2d1c980ad7
commit fefc7d9b49
1 file changed
+3 -1
+3 -1
View File
@@ -323,7 +323,9 @@ static int PyTask_init(PyTask *self, PyObject *args, PyObject *kwds) {
}
static void PyTask_dealloc(PyTask *self) {
free_task_spec(self->spec);
if (self->spec != NULL) {
free_task_spec(self->spec);
}
Py_TYPE(self)->tp_free((PyObject *) self);
}