All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: qemu-trivial@nongnu.org
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-trivial] [PATCH] hmp: Fix freeing of PciInfoList
Date: Wed, 11 Jan 2012 10:51:52 -0500	[thread overview]
Message-ID: <4F0DB018.5080302@linux.vnet.ibm.com> (raw)

Remember the original PciInfoList in info_list and use
the info variable to traverse the list.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

---
  hmp.c |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Index: qemu-git.pt/hmp.c
===================================================================
--- qemu-git.pt.orig/hmp.c
+++ qemu-git.pt/hmp.c
@@ -486,17 +486,17 @@ static void hmp_info_pci_device(Monitor

  void hmp_info_pci(Monitor *mon)
  {
-    PciInfoList *info;
+    PciInfoList *info_list, info;
      Error *err = NULL;

-    info = qmp_query_pci(&err);
+    info_list = qmp_query_pci(&err);
      if (err) {
          monitor_printf(mon, "PCI devices not supported\n");
          error_free(err);
          return;
      }

-    for (; info; info = info->next) {
+    for (info = info_list; info; info = info->next) {
          PciDeviceInfoList *dev;

          for (dev = info->value->devices; dev; dev = dev->next) {
@@ -504,7 +504,7 @@ void hmp_info_pci(Monitor *mon)
          }
      }

-    qapi_free_PciInfoList(info);
+    qapi_free_PciInfoList(info_list);
  }

  void hmp_info_tpm(Monitor *mon)



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: qemu-trivial@nongnu.org
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] hmp: Fix freeing of PciInfoList
Date: Wed, 11 Jan 2012 10:51:52 -0500	[thread overview]
Message-ID: <4F0DB018.5080302@linux.vnet.ibm.com> (raw)

Remember the original PciInfoList in info_list and use
the info variable to traverse the list.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

---
  hmp.c |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Index: qemu-git.pt/hmp.c
===================================================================
--- qemu-git.pt.orig/hmp.c
+++ qemu-git.pt/hmp.c
@@ -486,17 +486,17 @@ static void hmp_info_pci_device(Monitor

  void hmp_info_pci(Monitor *mon)
  {
-    PciInfoList *info;
+    PciInfoList *info_list, info;
      Error *err = NULL;

-    info = qmp_query_pci(&err);
+    info_list = qmp_query_pci(&err);
      if (err) {
          monitor_printf(mon, "PCI devices not supported\n");
          error_free(err);
          return;
      }

-    for (; info; info = info->next) {
+    for (info = info_list; info; info = info->next) {
          PciDeviceInfoList *dev;

          for (dev = info->value->devices; dev; dev = dev->next) {
@@ -504,7 +504,7 @@ void hmp_info_pci(Monitor *mon)
          }
      }

-    qapi_free_PciInfoList(info);
+    qapi_free_PciInfoList(info_list);
  }

  void hmp_info_tpm(Monitor *mon)

             reply	other threads:[~2012-01-11 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 15:51 Stefan Berger [this message]
2012-01-11 15:51 ` [Qemu-devel] [PATCH] hmp: Fix freeing of PciInfoList Stefan Berger
2012-01-12 13:35 ` [Qemu-trivial] " Stefan Hajnoczi
2012-01-12 13:35   ` [Qemu-devel] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0DB018.5080302@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.