tiny refactor
This commit is contained in:
1 parent
71da517e88
commit
6bebce0b5a
1 file changed
+3
-4
+3
-4
@@ -276,13 +276,12 @@ func (alloc *Allocator) Delete(ident string) error {
|
||||
|
||||
func (alloc *Allocator) delete(ident string) error {
|
||||
addrs := alloc.removeAllOwned(ident)
|
||||
for _, addr := range addrs {
|
||||
alloc.space.Free(addr)
|
||||
}
|
||||
|
||||
if len(addrs) == 0 {
|
||||
return fmt.Errorf("Delete: no addresses for %s", ident)
|
||||
}
|
||||
for _, addr := range addrs {
|
||||
alloc.space.Free(addr)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user