Commits

Ronald Oussoren committed 842b215

try to fix crash on GNUstep

Comments (0)

Files changed (1)

Modules/objc/objc-runtime-gnu.m

 
 	cls->protocols = metaCls->protocols = NULL;
 
+        __objc_install_premature_dtable (metaCls);
 	__objc_install_premature_dtable (cls);
-        __objc_install_premature_dtable (metaCls);
 
 	return 0;
 }
 		while (cur != NULL) {
 			next = cur->method_next;
 
-			free(cur);
+			objc_free(cur);
 			cur = next;
 		}
 		cls->methods = NULL;
 {
         struct objc_method_list *mlist;
 
-        mlist = malloc(sizeof(struct objc_method_list)
+        mlist = objc_malloc(sizeof(struct objc_method_list)
                  + ((numMethods+1) * sizeof(struct objc_method)));
 
         if (mlist == NULL) {