From dce3e6448f98eb404cd950a641ab494feb0785d9 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 27 Mar 2013 14:50:15 -0500 Subject: [PATCH] FileAnalysis: fix a memory leak. --- src/file_analysis/Info.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/file_analysis/Info.cc b/src/file_analysis/Info.cc index e22cf66124..51c7a53241 100644 --- a/src/file_analysis/Info.cc +++ b/src/file_analysis/Info.cc @@ -12,11 +12,14 @@ using namespace file_analysis; -static TableVal* empty_connection_table() +static Val* empty_connection_table() { TypeList* tbl_index = new TypeList(conn_id); 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)