qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, alevy@redhat.com
Subject: [Qemu-devel] [PATCH 2/1] libcacard: Clean up dead stores before g_free()
Date: Fri,  6 Jun 2014 21:30:32 +0200	[thread overview]
Message-ID: <1402083032-13852-1-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1402072328-6871-1-git-send-email-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 libcacard/vcard.c   | 4 ----
 libcacard/vreader.c | 2 --
 2 files changed, 6 deletions(-)

diff --git a/libcacard/vcard.c b/libcacard/vcard.c
index bf342aa..87ad516 100644
--- a/libcacard/vcard.c
+++ b/libcacard/vcard.c
@@ -117,10 +117,8 @@ vcard_delete_applet(VCardApplet *applet)
     }
     if (applet->applet_private_free) {
         applet->applet_private_free(applet->applet_private);
-        applet->applet_private = NULL;
     }
     g_free(applet->aid);
-    applet->aid = NULL;
     g_free(applet);
 }
 
@@ -174,8 +172,6 @@ vcard_free(VCard *vcard)
     }
     if (vcard->vcard_private_free) {
         (*vcard->vcard_private_free)(vcard->vcard_private);
-        vcard->vcard_private_free = 0;
-        vcard->vcard_private = 0;
     }
     for (current_applet = vcard->applet_list; current_applet;
                                         current_applet = next_applet) {
diff --git a/libcacard/vreader.c b/libcacard/vreader.c
index ffa05b6..9f42f0f 100644
--- a/libcacard/vreader.c
+++ b/libcacard/vreader.c
@@ -343,8 +343,6 @@ vreader_list_delete(VReaderList *list)
         next_entry = vreader_list_get_next(current_entry);
         vreader_list_entry_delete(current_entry);
     }
-    list->head = NULL;
-    list->tail = NULL;
     g_free(list);
 }
 
-- 
1.9.3

  parent reply	other threads:[~2014-06-06 19:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 16:32 [Qemu-devel] [PATCH] libcacard: Drop superfluous conditionals around g_free() Markus Armbruster
2014-06-06 16:39 ` Paolo Bonzini
2014-06-06 16:59   ` Markus Armbruster
2014-06-06 17:20     ` Paolo Bonzini
2014-06-06 19:30 ` Markus Armbruster [this message]
2014-06-06 21:33   ` [Qemu-devel] [PATCH 2/1] libcacard: Clean up dead stores before g_free() Eric Blake
2014-06-08 13:45 ` [Qemu-devel] [Qemu-trivial] [PATCH] libcacard: Drop superfluous conditionals around g_free() Michael Tokarev

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=1402083032-13852-1-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=alevy@redhat.com \
    --cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).