From cc1cfed76e347b6aaa343ec89ccf107d158951ea Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 10 Dec 2003 15:28:30 +0000 Subject: [PATCH] Huh, memory management is jam is tricky. [SVN r21209] --- historic/jam/src/modules/property-set.c | 6 ++++-- jam_src/modules/property-set.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/historic/jam/src/modules/property-set.c b/historic/jam/src/modules/property-set.c index 7aa7bc848..439cead53 100644 --- a/historic/jam/src/modules/property-set.c +++ b/historic/jam/src/modules/property-set.c @@ -26,7 +26,7 @@ rule create ( raw-properties * ) LIST *property_set_create( PARSE *parse, FRAME *frame ) { LIST* properties = lol_get( frame->args, 0 ); - LIST* sorted = list_short(properties); + LIST* sorted = list_sort(properties); LIST* unique = list_unique(sorted); LIST* val; @@ -63,8 +63,10 @@ LIST *property_set_create( PARSE *parse, FRAME *frame ) } string_free(var); + /* The 'unique' is freed in 'frame_free' class. */ list_free(sorted); - list_free(unique); + + return val; diff --git a/jam_src/modules/property-set.c b/jam_src/modules/property-set.c index 7aa7bc848..439cead53 100644 --- a/jam_src/modules/property-set.c +++ b/jam_src/modules/property-set.c @@ -26,7 +26,7 @@ rule create ( raw-properties * ) LIST *property_set_create( PARSE *parse, FRAME *frame ) { LIST* properties = lol_get( frame->args, 0 ); - LIST* sorted = list_short(properties); + LIST* sorted = list_sort(properties); LIST* unique = list_unique(sorted); LIST* val; @@ -63,8 +63,10 @@ LIST *property_set_create( PARSE *parse, FRAME *frame ) } string_free(var); + /* The 'unique' is freed in 'frame_free' class. */ list_free(sorted); - list_free(unique); + + return val;