X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fhb-payee.c;h=fc1829b00b8588e32fc55bde4ba6507864b08707;hb=bdebe90556646c9672ca2e4f84c0cc654cbccc8f;hp=fa49406810fa077dd56bb8cc5fb109ad9448f62c;hpb=a6c6b0df5492c2160ed97e3a376bdb2fe7c5ebc4;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)); }