Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
096a85c5
Commit
096a85c5
authored
Oct 06, 2014
by
Mike Hibler
Browse files
Nit: add some missing unlock calls on errors.
parent
75b39948
Changes
1
Show whitespace changes
Inline
Side-by-side
tbsetup/libvtop_test.pm.in
View file @
096a85c5
...
...
@@ -8003,8 +8003,10 @@ sub CheckIPAddressReservations($) {
# Now preload the reservations in the DB, including those associated
# with this experiment. The buddy allocator will allocate around
# these.
$buddy->loadReservedRanges($self->experiment()) == 0
or return -1;
if ($buddy->loadReservedRanges($self->experiment())) {
$buddy->unlock();
return -1;
}
foreach my $virtlan (@sharedlans) {
my $vlanname = $virtlan->vname();
...
...
@@ -8018,9 +8020,11 @@ sub CheckIPAddressReservations($) {
}
if ($hbits > 24) {
tberror("Lan $vlanname has too many members!\n");
$buddy->unlock();
return -1;
}
my $prefix = 32 - $hbits;
$self->printdb("Got prefix $prefix\n");
my $newmask = Socket::inet_ntoa(pack("B32", "1" x $prefix));
$virtlan->_mask($newmask);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment