diff options
Diffstat (limited to 'libpod/boltdb_state.go')
-rw-r--r-- | libpod/boltdb_state.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index acba61f2a..31b551b36 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -1403,11 +1403,10 @@ func (s *BoltState) AddVolume(volume *Volume) error { // Volume state is allowed to not exist var volStateJSON []byte if volume.state != nil { - stateJSON, err := json.Marshal(volume.state) + volStateJSON, err = json.Marshal(volume.state) if err != nil { return errors.Wrapf(err, "error marshalling volume %s state to JSON", volume.Name()) } - volStateJSON = stateJSON } db, err := s.getDBCon() |