forked from mirrors/homebox
fix: ensure rows are closed (#670)
Former-commit-id: 85c8e4701606c7e4f1850414d467352f436a0e9e
This commit is contained in:
parent
0c535aa8d8
commit
1cc9bf459a
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,7 @@ func (r *LocationRepository) GetAll(ctx context.Context, GID uuid.UUID, filter L
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer rows.Close()
|
||||||
|
|
||||||
list := []LocationOutCount{}
|
list := []LocationOutCount{}
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
|
@ -285,6 +286,7 @@ func (lr *LocationRepository) PathForLoc(ctx context.Context, GID, locID uuid.UU
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer rows.Close()
|
||||||
|
|
||||||
var locations []LocationPath
|
var locations []LocationPath
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue