diff options
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } |