[gnumeric] Names: plug leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Names: plug leak.
- Date: Sat, 26 Feb 2022 17:32:24 +0000 (UTC)
commit b593040e29a05bf1de7f0d094029e7ff3f7b593a
Author: Morten Welinder <terra gnome org>
Date: Sat Feb 26 12:31:53 2022 -0500
Names: plug leak.
Hard-to-hit leak relating to shared expressions.
ChangeLog | 4 ++++
NEWS | 1 +
src/expr-name.c | 6 +++++-
3 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index c557eea0d..7f7932cdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-02-26 Morten Welinder <terra gnome org>
+
+ * src/expr-name.c (expr_name_set_expr): Plug leak.
+
2022-01-21 Morten Welinder <terra gnome org>
* src/wbc-gtk-actions.c: In vertical toolbar mode, show a combo
diff --git a/NEWS b/NEWS
index 31058c2a3..ee3bbfc1e 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Morten:
* Fix BITAND.
* Test improvements.
* Fix xlsx write for sheet objects with text contents. [#617]
+ * Fix leak.
--------------------------------------------------------------------------
Gnumeric 1.12.51
diff --git a/src/expr-name.c b/src/expr-name.c
index f9d50cd8e..08ff9287d 100644
--- a/src/expr-name.c
+++ b/src/expr-name.c
@@ -1041,8 +1041,12 @@ expr_name_set_expr (GnmNamedExpr *nexpr, GnmExprTop const *texpr)
g_return_if_fail (nexpr != NULL);
- if (texpr == nexpr->texpr)
+ if (texpr == nexpr->texpr) {
+ if (texpr)
+ gnm_expr_top_unref (texpr);
return;
+ }
+
if (nexpr->texpr != NULL) {
GSList *deps = NULL, *junk = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]