Changeset 0a3fbc7 in mainline


Ignore:
Timestamp:
2010-10-27T21:47:02Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e9caf47, f2d2c604
Parents:
03649d8
Message:

Do not leak eth_globals.broadcast_addr in case of a failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth.c

    r03649d8 r0a3fbc7  
    211211                goto out;
    212212        }
    213         if (ERROR_OCCURRED(eth_devices_initialize(&eth_globals.devices)))
     213        if (ERROR_OCCURRED(eth_devices_initialize(&eth_globals.devices))) {
     214                free(eth_globals.broadcast_addr);
    214215                goto out;
    215         if (ERROR_OCCURRED(eth_protos_initialize(&eth_globals.protos)))
     216        }
     217        if (ERROR_OCCURRED(eth_protos_initialize(&eth_globals.protos))) {
     218                free(eth_globals.broadcast_addr);
    216219                eth_devices_destroy(&eth_globals.devices);
     220        }
    217221out:
    218222        fibril_rwlock_write_unlock(&eth_globals.protos_lock);
Note: See TracChangeset for help on using the changeset viewer.