Fix segfault cleaning up in after failing to create a Runtime

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
Matthew Heon 2017-11-09 14:51:45 -05:00
parent 4bc3acc7aa
commit 57300be94d

View file

@ -97,7 +97,7 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
if err != nil {
// Don't forcibly shut down
// We could be opening a store in use by another libpod
_, err2 := runtime.store.Shutdown(false)
_, err2 := store.Shutdown(false)
if err2 != nil {
logrus.Errorf("Error removing store for partially-created runtime: %s", err2)
}