Changes in uspace/lib/c/generic/dnsr.c [e948fde:58563585] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/dnsr.c
re948fde r58563585 52 52 IPC_FLAG_BLOCKING); 53 53 54 dnsr_sess = loc_service_connect( EXCHANGE_SERIALIZE, dnsr_svc,54 dnsr_sess = loc_service_connect(dnsr_svc, INTERFACE_DNSR, 55 55 IPC_FLAG_BLOCKING); 56 56 } … … 69 69 int dnsr_name2host(const char *name, dnsr_hostinfo_t **rinfo, ip_ver_t ver) 70 70 { 71 dnsr_hostinfo_t *info = calloc(1, sizeof(dnsr_hostinfo_t));72 if (info == NULL)73 return ENOMEM;74 75 71 async_exch_t *exch = dnsr_exchange_begin(); 76 72 … … 85 81 return rc; 86 82 } 83 84 dnsr_hostinfo_t *info = calloc(1, sizeof(dnsr_hostinfo_t)); 85 if (info == NULL) 86 return ENOMEM; 87 87 88 88 ipc_call_t answer_addr; … … 96 96 async_exchange_end(exch); 97 97 async_forget(req); 98 free(info); 98 99 return (int) retval_addr; 99 100 } … … 111 112 if (retval_cname != EOK) { 112 113 async_forget(req); 114 free(info); 113 115 return (int) retval_cname; 114 116 } … … 117 119 async_wait_for(req, &retval); 118 120 119 if (retval != EOK) 121 if (retval != EOK) { 122 async_forget(req); 123 free(info); 120 124 return (int) retval; 125 } 121 126 122 127 size_t act_size = IPC_GET_ARG2(answer_cname); … … 127 132 info->cname = str_dup(cname_buf); 128 133 134 if (info->cname == NULL) { 135 free(info); 136 return ENOMEM; 137 } 138 129 139 *rinfo = info; 130 140 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.