attr-sql: Fix double free when adding subnets for unknown attribute types
authorTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 15:17:24 +0000 (17:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 15:20:53 +0000 (17:20 +0200)
src/libhydra/plugins/attr_sql/pool_attributes.c

index 5dcfe85..0b8f934 100644 (file)
@@ -153,6 +153,7 @@ static bool parse_attributes(char *name, char *value, value_type_t *value_type,
                                memcpy(pos_addr,     addr_chunk.ptr, 4);
                                memcpy(pos_addr + 4, mask_chunk.ptr, 4);
                                addr->destroy(addr);
+                               addr = NULL;
                                mask->destroy(mask);
                                chunk_free(blob);
                                *blob = blob_next;