[lxc-devel] [lxd/master] Don't use un-initialized structs in import

stgraber on Github lxc-bot at linuxcontainers.org
Mon Jul 31 21:59:45 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/20170731/26fe3f12/attachment.bin>
-------------- next part --------------
From 8661a5d35d55855ecab544080645af1126283ee5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 31 Jul 2017 17:59:19 -0400
Subject: [PATCH] Don't use un-initialized structs in import
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/api_internal.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/api_internal.go b/lxd/api_internal.go
index a41746ff5..09c49da3f 100644
--- a/lxd/api_internal.go
+++ b/lxd/api_internal.go
@@ -204,7 +204,7 @@ func internalImport(d *Daemon, r *http.Request) Response {
 
 	if poolErr == NoSuchObjectError {
 		// Create the storage pool db entry if it doesn't exist.
-		err := storagePoolDBCreate(d, containerPoolName, pool.Description, backup.Pool.Driver, backup.Pool.Config)
+		err := storagePoolDBCreate(d, containerPoolName, "", backup.Pool.Driver, backup.Pool.Config)
 		if err != nil {
 			return SmartError(err)
 		}


More information about the lxc-devel mailing list