aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-07-10 19:55:20 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-07-10 19:55:21 +0100
commit42e1d798a6a01817bdcf722ac27eea01531e21cd (patch)
tree9c97b2ca0318c43e62c99753a57236b4fab788d6 /util
parentfc32b91a88cc9cd560da5488bdca4d69f2bac620 (diff)
parente60edf69e2f64e818466019313517a2e6d6b63f4 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches - Make blockdev-reopen stable - Remove deprecated qemu-img backing file without format - rbd: Convert to coroutines and add write zeroes support - rbd: Updated MAINTAINERS - export/fuse: Allow other users access to the export - vhost-user: Fix backends without multiqueue support - Fix drive-backup transaction endless drained section # gpg: Signature made Fri 09 Jul 2021 13:49:22 BST # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (28 commits) block: Make blockdev-reopen stable API iotests: Test reopening multiple devices at the same time block: Support multiple reopening with x-blockdev-reopen block: Acquire AioContexts during bdrv_reopen_multiple() block: Add bdrv_reopen_queue_free() qcow2: Fix dangling pointer after reopen for 'file' qemu-img: Improve error for rebase without backing format qemu-img: Require -F with -b backing image qcow2: Prohibit backing file changes in 'qemu-img amend' blockdev: fix drive-backup transaction endless drained section vhost-user: Fix backends without multiqueue support MAINTAINERS: add block/rbd.c reviewer block/rbd: fix type of task->complete iotests/fuse-allow-other: Test allow-other iotests/308: Test +w on read-only FUSE exports export/fuse: Let permissions be adjustable export/fuse: Give SET_ATTR_SIZE its own branch export/fuse: Add allow-other option export/fuse: Pass default_permissions for mount util/uri: do not check argument of uri_free() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/uri.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/util/uri.c b/util/uri.c
index 8bdef84120..ff72c6005f 100644
--- a/util/uri.c
+++ b/util/uri.c
@@ -1340,7 +1340,7 @@ static void uri_clean(URI *uri)
/**
* uri_free:
- * @uri: pointer to an URI
+ * @uri: pointer to an URI, NULL is ignored
*
* Free up the URI struct
*/
@@ -1939,15 +1939,9 @@ step_7:
val = uri_to_string(res);
done:
- if (ref != NULL) {
- uri_free(ref);
- }
- if (bas != NULL) {
- uri_free(bas);
- }
- if (res != NULL) {
- uri_free(res);
- }
+ uri_free(ref);
+ uri_free(bas);
+ uri_free(res);
return val;
}
@@ -2190,12 +2184,8 @@ done:
if (remove_path != 0) {
ref->path = NULL;
}
- if (ref != NULL) {
- uri_free(ref);
- }
- if (bas != NULL) {
- uri_free(bas);
- }
+ uri_free(ref);
+ uri_free(bas);
return val;
}