X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-assign.c;h=21a88fdaef3ad08b922505b8df24636707c4e7f6;hb=0e1e5f856e9ab5faa63fd822354781baccccbcd9;hp=3d3f2a943a54152448311a4116cdf95bf0550eb1;hpb=236cb5e47660876f46488ea8f76ecd5bebfa1fac;p=chaz%2Fhomebank diff --git a/src/hb-assign.c b/src/hb-assign.c index 3d3f2a9..21a88fd 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)); }