OSDN Git Service

acl: Free memory allocated with g_malloc() with g_free()
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Jan 2013 14:24:16 +0000 (15:24 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 16 Jan 2013 00:25:41 +0000 (18:25 -0600)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
util/acl.c

index 21b2205..a7f33ff 100644 (file)
@@ -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;
 }