X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-tag.c;h=96cb5bf496dd7d518ae02e12a61b3f342e847975;hb=35b9973e4de7d69ad8841ead996a2e6cf1d85f08;hp=13065edb8d13d9ad6ae2966773ae0e463ec76a83;hpb=d11c8dd3275ed2a4a35598e69c0804dcf9435766;p=chaz%2Fhomebank diff --git a/src/hb-tag.c b/src/hb-tag.c index 13065ed..96cb5bf 100644 --- a/src/hb-tag.c +++ b/src/hb-tag.c @@ -20,6 +20,9 @@ #include "homebank.h" #include "hb-tag.h" +#include "ext.h" +#include "refcount.h" + #define MYDEBUG 0 #if MYDEBUG @@ -37,12 +40,12 @@ extern struct HomeBank *GLOBALS; void da_tag_free(Tag *item) { DB( g_print("da_tag_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); } } @@ -50,7 +53,7 @@ void da_tag_free(Tag *item) Tag *da_tag_malloc(void) { DB( g_print("da_tag_malloc\n") ); - return g_malloc0(sizeof(Tag)); + return rc_alloc(sizeof(Tag)); }