From 89a7ad744a4826d94e1f13cda9ef0b74c42b3f7d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 20 May 2019 15:11:17 -0400 Subject: [PATCH] Fix crash on tesing of aufs code Signed-off-by: Daniel J Walsh --- drivers/aufs/aufs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/aufs/aufs.go b/drivers/aufs/aufs.go index e821bc0c5..353d1707a 100644 --- a/drivers/aufs/aufs.go +++ b/drivers/aufs/aufs.go @@ -255,6 +255,9 @@ func (a *Driver) AdditionalImageStores() []string { // CreateFromTemplate creates a layer with the same contents and parent as another layer. func (a *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error { + if opts == nil { + opts = &graphdriver.CreateOpts{} + } return graphdriver.NaiveCreateFromTemplate(a, id, template, templateIDMappings, parent, parentIDMappings, opts, readWrite) }