diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-04-05 17:31:20 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-04-05 17:31:20 +0200 |
commit | 6a5c357fdbd4c91c5142f1b7ccf4658664b52ea2 (patch) | |
tree | d16c0871122bf07bb6bce744b037c3350aa23f38 | |
parent | 76b223200ef4fb09dd87f0e213159795eb68e7a5 (diff) | |
parent | 95c3df5a24e2f18129b58691c2ebaf0d86808525 (diff) |
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-05' into queue-block
Block patches for the 2.6 release
# gpg: Signature made Tue Apr 5 17:23:48 2016 CEST using RSA key ID E838ACAD
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
* mreitz/tags/pull-block-for-kevin-2016-04-05:
crypto: Avoid memory leak on failure
qemu-iotests: 149: Use "/usr/bin/env python"
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/crypto.c | 12 | ||||
-rwxr-xr-x | tests/qemu-iotests/149 | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/block/crypto.c b/block/crypto.c index be3498581c..1903e84fbd 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -196,6 +196,7 @@ block_crypto_open_opts_init(QCryptoBlockFormat format, OptsVisitor *ov; QCryptoBlockOpenOptions *ret = NULL; Error *local_err = NULL; + Error *end_err = NULL; ret = g_new0(QCryptoBlockOpenOptions, 1); ret->format = format; @@ -218,10 +219,9 @@ block_crypto_open_opts_init(QCryptoBlockFormat format, error_setg(&local_err, "Unsupported block format %d", format); break; } - error_propagate(errp, local_err); - local_err = NULL; - visit_end_struct(opts_get_visitor(ov), &local_err); + visit_end_struct(opts_get_visitor(ov), &end_err); + error_propagate(&local_err, end_err); out: if (local_err) { @@ -242,6 +242,7 @@ block_crypto_create_opts_init(QCryptoBlockFormat format, OptsVisitor *ov; QCryptoBlockCreateOptions *ret = NULL; Error *local_err = NULL; + Error *end_err = NULL; ret = g_new0(QCryptoBlockCreateOptions, 1); ret->format = format; @@ -264,10 +265,9 @@ block_crypto_create_opts_init(QCryptoBlockFormat format, error_setg(&local_err, "Unsupported block format %d", format); break; } - error_propagate(errp, local_err); - local_err = NULL; - visit_end_struct(opts_get_visitor(ov), &local_err); + visit_end_struct(opts_get_visitor(ov), &end_err); + error_propagate(&local_err, end_err); out: if (local_err) { diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149 index bb5811d93b..52e23d2946 100755 --- a/tests/qemu-iotests/149 +++ b/tests/qemu-iotests/149 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # Copyright (C) 2016 Red Hat, Inc. # |