X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-payee.c;h=fc1829b00b8588e32fc55bde4ba6507864b08707;hb=0e1e5f856e9ab5faa63fd822354781baccccbcd9;hp=fa49406810fa077dd56bb8cc5fb109ad9448f62c;hpb=236cb5e47660876f46488ea8f76ecd5bebfa1fac;p=chaz%2Fhomebank diff --git a/src/hb-payee.c b/src/hb-payee.c index fa49406..fc1829b 100644 --- a/src/hb-payee.c +++ b/src/hb-payee.c @@ -20,6 +20,9 @@ #include "homebank.h" #include "hb-payee.h" +#include "ext.h" +#include "refcount.h" + /****************************************************************************/ /* Debug macros */ @@ -45,12 +48,12 @@ void da_pay_free(Payee *item) { DB( g_print("da_pay_free\n") ); - if(item != NULL) + if(rc_unref(item)) { DB( g_print(" => %d, %s\n", item->key, item->name) ); g_free(item->name); - g_free(item); + rc_free(item); } } @@ -59,7 +62,7 @@ Payee * da_pay_malloc(void) { DB( g_print("da_pay_malloc\n") ); - return g_malloc0(sizeof(Payee)); + return rc_alloc(sizeof(Payee)); }