diff mbox

[PULL,12/13] qobject: Catch another straggler for use of qdict_put_str()

Message ID 9f98da52e8bf0515d204861bbef2bf4d5abb618f.1499866676.git.mjt@msgid.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev July 12, 2017, 1:38 p.m. UTC
From: Eric Blake <eblake@redhat.com>

Dan's addition of key-secret improvements in commit 29cf9336 was
developed prior to the addition of QDict scalar insertion macros,
but merged after the general cleanup in commit 46f5ac20.
Patch created mechanically by rerunning:
  spatch --sp-file scripts/coccinelle/qobject.cocci \
         --macro-file scripts/cocci-macro-file.h --dir . --in-place

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/qemu-img.c b/qemu-img.c
index f7ffb79db6..02900ce1d1 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -355,7 +355,7 @@  static int img_add_key_secrets(void *opaque,
     QDict *options = opaque;
 
     if (g_str_has_suffix(name, "key-secret")) {
-        qdict_put(options, name, qstring_from_str(value));
+        qdict_put_str(options, name, value);
     }
 
     return 0;