49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
|
From 3b9f98fb670b97911fc0d307d22cbf87e6ad27e6 Mon Sep 17 00:00:00 2001
|
||
|
From: Christian Hergert <chergert@redhat.com>
|
||
|
Date: Wed, 12 Jun 2024 16:03:12 -0700
|
||
|
Subject: [PATCH] breakpoint: plug leak of cond_1 in failure paths
|
||
|
|
||
|
---
|
||
|
src/adw-breakpoint.c | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/src/adw-breakpoint.c b/src/adw-breakpoint.c
|
||
|
index 3d69420c4..eb2710ea3 100644
|
||
|
--- a/src/adw-breakpoint.c
|
||
|
+++ b/src/adw-breakpoint.c
|
||
|
@@ -642,6 +642,7 @@ parse_multi (const char *str,
|
||
|
return cond_1;
|
||
|
} else {
|
||
|
*error = CONDITION_PARSER_ERROR_UNKNOWN_OPERATOR;
|
||
|
+ g_clear_pointer (&cond_1, adw_breakpoint_condition_free);
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
@@ -650,6 +651,7 @@ parse_multi (const char *str,
|
||
|
} else {
|
||
|
*endp = (char *) str;
|
||
|
*error = CONDITION_PARSER_ERROR_UNEXPECTED_CHARACTER;
|
||
|
+ g_clear_pointer (&cond_1, adw_breakpoint_condition_free);
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
@@ -663,6 +665,7 @@ parse_multi (const char *str,
|
||
|
|
||
|
if (!cond_2) {
|
||
|
*endp = (char *) str;
|
||
|
+ g_clear_pointer (&cond_1, adw_breakpoint_condition_free);
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
@@ -679,6 +682,7 @@ parse_multi (const char *str,
|
||
|
|
||
|
if (!cond_2) {
|
||
|
*endp = (char *) str;
|
||
|
+ g_clear_pointer (&cond_1, adw_breakpoint_condition_free);
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
GitLab
|
||
|
|