When dump_init()'s check for non-zero @length fails, dump_cleanup()
passes null s->string_table_buf to g_array_unref(), which spews "GLib:
g_array_unref: assertion 'array' failed" to stderr.
Guard the g_array_unref().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20231031104531.
3169721-3-armbru@redhat.com>
memory_mapping_list_free(&s->list);
close(s->fd);
g_free(s->guest_note);
- g_array_unref(s->string_table_buf);
+ g_clear_pointer(&s->string_table_buf, g_array_unref);
s->guest_note = NULL;
if (s->resume) {
if (s->detached) {