From 751670a93bcc6c37ee347df94d055fb1ad57c507 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 29 Oct 2013 13:14:37 +0100 Subject: [PATCH] swid: Properly clean up after reading SWID tag --- src/libpts/swid/swid_inventory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libpts/swid/swid_inventory.c b/src/libpts/swid/swid_inventory.c index 3cbafe98f7..a689ccdaa8 100644 --- a/src/libpts/swid/swid_inventory.c +++ b/src/libpts/swid/swid_inventory.c @@ -68,7 +68,7 @@ static bool collect_tags(private_swid_inventory_t *this, char *pathname, return FALSE; } DBG2(DBG_IMC, "entering %s", pathname); - + while (enumerator->enumerate(enumerator, &rel_name, &abs_name, &st)) { char * start, *stop; @@ -208,9 +208,10 @@ static bool collect_tags(private_swid_inventory_t *this, char *pathname, goto end; } xml_tag = chunk_create(addr, sb.st_size); - tag = swid_tag_create(xml_tag, unique_seq_id); this->list->insert_last(this->list, tag); + munmap(addr, sb.st_size); + close(fd); } else { -- 2.47.2