Changeset ae754e5f in mainline
- Timestamp:
- 2011-10-31T10:44:12Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 10059a68
- Parents:
- 3562cd18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/recognise.c
r3562cd18 rae754e5f 350 350 ddf_dev_ops_t *dev_ops, void *dev_data, ddf_fun_t **child_fun) 351 351 { 352 if (child_fun == NULL) 353 return EINVAL; 354 352 355 size_t this_device_name_index; 353 356 … … 389 392 390 393 child = ddf_fun_create(parent, fun_inner, child_name); 394 free(child_name); 391 395 if (child == NULL) { 392 396 rc = ENOMEM; … … 412 416 } 413 417 414 if (child_fun != NULL) { 415 *child_fun = child; 416 } 417 418 *child_fun = child; 418 419 return EOK; 419 420 420 421 failure: 421 422 if (child != NULL) { 422 child->name = NULL; 423 /* This was not malloced by us, does not even have to be 424 * on heap. */ 425 child->driver_data = NULL; 423 426 /* This takes care of match_id deallocation as well. */ 424 427 ddf_fun_destroy(child); 425 428 } 426 if (child_name != NULL) {427 free(child_name);428 }429 429 430 430 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.