sw-collector: Unmap history file on failure to instantiate extractor
authorTobias Brunner <tobias@strongswan.org>
Wed, 15 Nov 2017 13:40:10 +0000 (14:40 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 15 Nov 2017 13:40:10 +0000 (14:40 +0100)
src/sw-collector/sw-collector.c

index e673dd6..a42f106 100644 (file)
@@ -249,6 +249,7 @@ static int extract_history(sw_collector_db_t *db)
        history = sw_collector_history_create(db, 1);
        if (!history)
        {
+               chunk_unmap(h);
                return EXIT_FAILURE;
        }