FileAnalysis: fix a memory leak.

This commit is contained in:
Jon Siwek 2013-03-27 14:50:15 -05:00
parent 704c705e7b
commit dce3e6448f

View file

@ -12,11 +12,14 @@
using namespace file_analysis; using namespace file_analysis;
static TableVal* empty_connection_table() static Val* empty_connection_table()
{ {
TypeList* tbl_index = new TypeList(conn_id); TypeList* tbl_index = new TypeList(conn_id);
tbl_index->Append(conn_id->Ref()); tbl_index->Append(conn_id->Ref());
return new TableVal(new TableType(tbl_index, connection_type->Ref())); TableType* tbl_type = new TableType(tbl_index, connection_type->Ref());
Val* rval = new TableVal(tbl_type);
Unref(tbl_type);
return rval;
} }
static RecordVal* get_conn_id_val(const Connection* conn) static RecordVal* get_conn_id_val(const Connection* conn)