X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-assign.c;h=1a89a45fc5a9a358aa8ff88299330004815b2ece;hb=35b9973e4de7d69ad8841ead996a2e6cf1d85f08;hp=7989ff9961fda8b5f011d322161a91eaa569570b;hpb=d11c8dd3275ed2a4a35598e69c0804dcf9435766;p=chaz%2Fhomebank diff --git a/src/hb-assign.c b/src/hb-assign.c index 7989ff9..1a89a45 100644 --- a/src/hb-assign.c +++ b/src/hb-assign.c @@ -20,6 +20,9 @@ #include "homebank.h" #include "hb-assign.h" +#include "ext.h" +#include "refcount.h" + #define MYDEBUG 0 #if MYDEBUG @@ -38,12 +41,12 @@ void da_asg_free(Assign *item) { DB( g_print("da_asg_free\n") ); - if(item != NULL) + if(rc_unref(item)) { DB( g_print(" => %d, %s\n", item->key, item->text) ); g_free(item->text); - g_free(item); + rc_free(item); } } @@ -52,7 +55,7 @@ Assign * da_asg_malloc(void) { DB( g_print("da_asg_malloc\n") ); - return g_malloc0(sizeof(Assign)); + return rc_alloc(sizeof(Assign)); }