[lxc-devel] [lxd/master] lxd/images; Initialize image info in direct case

stgraber on Github lxc-bot at linuxcontainers.org
Tue Jun 20 15:18:54 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170620/e59bad58/attachment.bin>
-------------- next part --------------
From ce27784b0c656843f61b27deacb7c226a938e83c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 20 Jun 2017 11:18:14 -0400
Subject: [PATCH] lxd/images; Initialize image info in direct case
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/daemon_images.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lxd/daemon_images.go b/lxd/daemon_images.go
index b2023d42f..44bbdcd32 100644
--- a/lxd/daemon_images.go
+++ b/lxd/daemon_images.go
@@ -466,6 +466,7 @@ func (d *Daemon) ImageDownload(op *operation, server string, protocol string, ce
 			return nil, err
 		}
 
+		info = &api.Image{}
 		info.Size = size
 		info.Architecture = imageMeta.Architecture
 		info.CreatedAt = time.Unix(imageMeta.CreationDate, 0)


More information about the lxc-devel mailing list