From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCCK-0005yR-Pv for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:25:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsCCJ-0000Bz-FL for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:25:16 -0400 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:38967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCCJ-0000Bc-8r for qemu-devel@nongnu.org; Thu, 27 Jun 2013 09:25:15 -0400 From: Markus Armbruster Date: Thu, 27 Jun 2013 15:25:12 +0200 Message-Id: <1372339512-28149-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, kraxel@redhat.com, qemu-stable@nongnu.org Commit 2c5f488 introduced qapi-based character device initialization as a new code path in qemu_chr_new_from_opts(). Unfortunately, it failed to store parameter opts in the new chardev. Therefore, qemu_chr_delete() doesn't delete it. Even though the device is gone, its options linger, and any attempt to create another one with the same ID fails. Cc: qemu-stable@nongnu.org Signed-off-by: Markus Armbruster --- qemu-char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-char.c b/qemu-char.c index a030e6b..63972ae 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3219,6 +3219,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, } chr = qemu_chr_find(id); + chr->opts = opts; qapi_out: qapi_free_ChardevBackend(backend); -- 1.7.11.7