Patchwork [2/2] acl: Free memory allocated with g_malloc() with g_free()

login
register
mail settings
Submitter Markus Armbruster
Date Jan. 15, 2013, 2:24 p.m.
Message ID <1358259856-9422-3-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/212169/
State New
Headers show

Comments

Markus Armbruster - Jan. 15, 2013, 2:24 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 util/acl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/util/acl.c b/util/acl.c
index 21b2205..a7f33ff 100644
--- a/util/acl.c
+++ b/util/acl.c
@@ -103,8 +103,8 @@  void qemu_acl_reset(qemu_acl *acl)
     acl->defaultDeny = 1;
     QTAILQ_FOREACH_SAFE(entry, &acl->entries, next, next_entry) {
         QTAILQ_REMOVE(&acl->entries, entry, next);
-        free(entry->match);
-        free(entry);
+        g_free(entry->match);
+        g_free(entry);
     }
     acl->nentries = 0;
 }