Changeset 401840b in mainline
- Timestamp:
- 2016-06-17T13:30:58Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 554e70f
- Parents:
- 741b2fb1
- git-author:
- Manuele Conti <conti.manuele@…> (2016-06-17 13:30:58)
- git-committer:
- Jakub Jermar <jakub@…> (2016-06-17 13:30:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/dnsr.c
r741b2fb1 r401840b 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; 121 125 } 126 122 127 size_t act_size = IPC_GET_ARG2(answer_cname); 123 128 assert(act_size <= DNSR_NAME_MAX_SIZE); 124 129 125 130 cname_buf[act_size] = '\0'; 126 131 127 132 info->cname = str_dup(cname_buf); 128 133 129 134 *rinfo = info; 130 135 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.