@@ -718,11 +718,11 @@ } void objc_exception_throw(id object) { - struct objc_exception *e = malloc(sizeof(*e)); + struct objc_exception *e = calloc(1, sizeof(*e)); bool emergency = false; if (e == NULL) { #ifdef OF_HAVE_THREADS if (!of_spinlock_lock(&emergency_exceptions_spinlock)) @@ -746,11 +746,10 @@ } if (e == NULL) OBJC_ERROR("Not enough memory to allocate exception!") - memset(e, 0, sizeof(*e)); e->exception.class = GNUCOBJC_EXCEPTION_CLASS; e->exception.cleanup = (emergency ? cleanup_emergency : cleanup); e->object = object; if (_Unwind_RaiseException(&e->exception) == _URC_END_OF_STACK &&