Skip to content

Commit

Permalink
Merge branch 'maint-free-memory' into maint #1086
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Jul 29, 2021
2 parents a7808f9 + afea6fd commit b8dad64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions bindings/engine.i
Expand Up @@ -77,6 +77,8 @@ declarations in the header files, some of which are included by
engine-common.i */

%newobject gnc_account_get_full_name;
%newobject xaccTransGetAPARAcctSplitList;
%newobject xaccTransGetPaymentAcctSplitList;

%include "engine-common.i"

Expand Down
6 changes: 6 additions & 0 deletions gnucash/gnome-utils/gnc-tree-model-owner.c
Expand Up @@ -192,6 +192,9 @@ gnc_tree_model_owner_finalize (GObject *object)
model = GNC_TREE_MODEL_OWNER (object);
priv = GNC_TREE_MODEL_OWNER_GET_PRIVATE(model);

if (priv->owner_list)
g_list_free_full (priv->owner_list, (GDestroyNotify) gncOwnerFree);

priv->book = NULL;
priv->owner_list = NULL;

Expand Down Expand Up @@ -976,6 +979,9 @@ gnc_tree_model_owner_event_handler (QofInstance *entity,
/* Tell the filters/views where the new owner was added. */
DEBUG("add owner %p (%s)", &owner, gncOwnerGetName(&owner));
/* First update our copy of the owner list. This isn't done automatically */
if (priv->owner_list)
g_list_free_full (priv->owner_list, (GDestroyNotify) gncOwnerFree);

priv->owner_list = gncBusinessGetOwnerList (priv->book,
gncOwnerTypeToQofIdType(priv->owner_type), TRUE);
increment_stamp(model);
Expand Down
8 changes: 5 additions & 3 deletions gnucash/report/gnc-report.c
Expand Up @@ -336,9 +336,11 @@ gnc_get_default_report_font_family(void)

pango_font_description_free (font_desc);

if (default_font_family == NULL ||
g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
return g_strdup("Arial");
if (g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
{
g_free (default_font_family);
return g_strdup ("Arial");
}
else
return default_font_family;
}
Expand Down

0 comments on commit b8dad64

Please sign in to comment.