From: Charles McGarvey Date: Mon, 2 Sep 2019 23:58:34 +0000 (-0600) Subject: Merge branch 'master' into ext-perl X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fext-perl;p=chaz%2Fhomebank Merge branch 'master' into ext-perl --- 930f295c8fb33beb573dafde28e38888f26d08d2 diff --cc src/hb-archive.c index 1f65214,cbb7328..7c4264f --- a/src/hb-archive.c +++ b/src/hb-archive.c @@@ -39,6 -36,50 +39,50 @@@ extern struct HomeBank *GLOBALS; + /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ + + + static void + da_archive_clean(Archive *item) + { + if(item != NULL) + { + if(item->memo != NULL) + { + g_free(item->memo); + item->memo = NULL; + } + + + + + + //5.3 added as it was a leak + if(item->tags != NULL) + { + g_free(item->tags); + item->tags = NULL; + } + if(item->splits != NULL) + { + da_split_destroy(item->splits); + item->splits = NULL; + item->flags &= ~(OF_SPLIT); //Flag that Splits are cleared + } + } + } + + + void da_archive_free(Archive *item) + { - if(item != NULL) ++ if(rc_unref(item)) + { + da_archive_clean(item); - g_free(item); ++ rc_free(item); + } + } + + Archive *da_archive_malloc(void) { Archive *item;