X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fhb-tag.c;fp=src%2Fhb-tag.c;h=c8353a489d0916c616c4929c81db437ba2d97d1c;hb=5b7b5519d955cd0c99d094ba140514e0a2b73083;hp=8554cfa3ad747d884431f24675b585c9bd0af383;hpb=8988b3bef0760b4cab8144715cc3d8f55688861c;p=chaz%2Fhomebank diff --git a/src/hb-tag.c b/src/hb-tag.c index 8554cfa..c8353a4 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)); }