Browse code

prevent image prune panic

Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>

Alfred Landrum authored on 2017/05/27 04:54:33
Showing 1 changed files
... ...
@@ -216,7 +216,7 @@ func (daemon *Daemon) ImagesPrune(ctx context.Context, pruneFilters filters.Args
216 216
 			if !until.IsZero() && img.Created.After(until) {
217 217
 				continue
218 218
 			}
219
-			if !matchLabels(pruneFilters, img.Config.Labels) {
219
+			if img.Config != nil && !matchLabels(pruneFilters, img.Config.Labels) {
220 220
 				continue
221 221
 			}
222 222
 			topImages[id] = img