Skip to content

Commit

Permalink
Merge pull request containers#3626 from mheon/fix_ps_segfault
Browse files Browse the repository at this point in the history
Fix a segfault on Podman no-store commands with refresh
  • Loading branch information
openshift-merge-robot authored Jul 24, 2019
2 parents 0917783 + 5fb4feb commit 2283471
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libpod/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -879,14 +879,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (err error) {
runtime.imageRuntime.Eventer = eventer
}

// Set up a storage service for creating container root filesystems from
// images
storageService, err := getStorageService(runtime.store)
if err != nil {
return err
}
runtime.storageService = storageService

// Set up containers/image
runtime.imageContext = &types.SystemContext{
SignaturePolicyPath: runtime.config.SignaturePolicyPath,
Expand Down Expand Up @@ -1330,6 +1322,14 @@ func (r *Runtime) configureStore() error {
r.store = store
is.Transport.SetStore(store)

// Set up a storage service for creating container root filesystems from
// images
storageService, err := getStorageService(r.store)
if err != nil {
return err
}
r.storageService = storageService

ir := image.NewImageRuntimeFromStore(r.store)
ir.SignaturePolicyPath = r.config.SignaturePolicyPath
ir.EventsLogFilePath = r.config.EventsLogFilePath
Expand Down

0 comments on commit 2283471

Please sign in to comment.