X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-payee.c;h=419bdeae643eb9307af790eccf53cb39de089fe3;hb=613fd4014fa5814bf2adce50574d520df8927ce1;hp=5992a4d0e544d98b264bfac12462e54bb1a67868;hpb=59c5e08a64798d4303ae7eb3a2713bc93d98fa7b;p=chaz%2Fhomebank diff --git a/src/hb-payee.c b/src/hb-payee.c index 5992a4d..419bdea 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 */ @@ -41,12 +44,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); } } @@ -55,7 +58,7 @@ Payee * da_pay_malloc(void) { DB( g_print("da_pay_malloc\n") ); - return g_malloc0(sizeof(Payee)); + return rc_alloc(sizeof(Payee)); }