X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-payee.c;h=558b76dd526c364a4a4af2b65c81c1757527a9bf;hb=35b9973e4de7d69ad8841ead996a2e6cf1d85f08;hp=896e9360057443c46d40eafbcde67b092c5014cd;hpb=d11c8dd3275ed2a4a35598e69c0804dcf9435766;p=chaz%2Fhomebank diff --git a/src/hb-payee.c b/src/hb-payee.c index 896e936..558b76d 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)); }