Changes in kernel/generic/src/ipc/ipcrsc.c [455241b:fc0de8c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipcrsc.c
r455241b rfc0de8c 44 44 #include <stdlib.h> 45 45 46 static void phone_destroy( kobject_t*arg)46 static void phone_destroy(void *arg) 47 47 { 48 phone_t *phone = phone_from_kobject(arg);48 phone_t *phone = (phone_t *) arg; 49 49 if (phone->hangup_call) 50 kobject_put( &phone->hangup_call->kobject);50 kobject_put(phone->hangup_call->kobject); 51 51 slab_free(phone_cache, phone); 52 52 } … … 76 76 return ENOMEM; 77 77 } 78 78 kobject_t *kobj = kobject_alloc(FRAME_ATOMIC); 79 if (!kobj) { 80 cap_free(TASK, handle); 81 slab_free(phone_cache, phone); 82 return ENOMEM; 83 } 79 84 call_t *hcall = ipc_call_alloc(); 80 85 if (!hcall) { 81 86 cap_free(TASK, handle); 82 87 slab_free(phone_cache, phone); 88 free(kobj); 83 89 return ENOMEM; 84 90 } … … 88 94 phone->hangup_call = hcall; 89 95 96 kobject_initialize(kobj, KOBJECT_TYPE_PHONE, phone); 97 phone->kobject = kobj; 98 90 99 if (publish) 91 cap_publish(task, handle, &phone->kobject);100 cap_publish(task, handle, kobj); 92 101 93 102 *phandle = handle; 94 103 if (kobject) 95 *kobject = &phone->kobject;104 *kobject = kobj; 96 105 } 97 106 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.