aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block.c b/block.c
index 8f17750..09d4c6b 100644
--- a/block.c
+++ b/block.c
@@ -6995,13 +6995,13 @@ void bdrv_refresh_filename(BlockDriverState *bs)
if (bs->exact_filename[0]) {
pstrcpy(bs->filename, sizeof(bs->filename), bs->exact_filename);
} else {
- QString *json = qobject_to_json(QOBJECT(bs->full_open_options));
+ GString *json = qobject_to_json(QOBJECT(bs->full_open_options));
if (snprintf(bs->filename, sizeof(bs->filename), "json:%s",
- qstring_get_str(json)) >= sizeof(bs->filename)) {
+ json->str) >= sizeof(bs->filename)) {
/* Give user a hint if we truncated things. */
strcpy(bs->filename + sizeof(bs->filename) - 4, "...");
}
- qobject_unref(json);
+ g_string_free(json, true);
}
}