From 98b80aa2be3add2ce4ef86a79c4e348db43c32d1 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sun, 28 Nov 2021 09:24:30 +0100 Subject: pluma-document: Redundant null check --- pluma/pluma-document.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pluma/pluma-document.c b/pluma/pluma-document.c index 2bc55995..f2cb8f94 100644 --- a/pluma/pluma-document.c +++ b/pluma/pluma-document.c @@ -2283,8 +2283,7 @@ pluma_document_replace_all (PlumaDocument *doc, &m_end, NULL); } else { - if(replace_text != NULL) - g_free (replace_text); + g_free (replace_text); replace_text = g_strdup (replace); found = pluma_gtk_text_iter_regex_search (&iter, search_text, @@ -2341,8 +2340,7 @@ pluma_document_replace_all (PlumaDocument *doc, pluma_document_set_enable_search_highlighting (doc, search_highliting); g_free (search_text); - if(replace_text != NULL) - g_free (replace_text); + g_free (replace_text); return cont; } -- cgit v1.2.1