talkatu/talkatu
Clone
Summary
Browse
Changes
Graph
Fix a couple error leaks
13 months ago, Elliott Sales de Andrade
712651f4acde
Parents
1ac936b66935
Children
7fd3c4c23d61
Fix a couple error leaks
If the caller didn't provide an output address, the local error would be leaked.
Testing Done:
Compiled only.
Reviewed at https://reviews.imfreedom.org/r/2382/
2 files changed, 2 insertions(+), 6 deletions(-)
+1
-3
talkatu/talkatumarkdown.c
+1
-3
talkatu/talkatumarkup.c
--- a/talkatu/talkatumarkdown.c Fri Feb 24 19:39:42 2023 -0600
+++ b/talkatu/talkatumarkdown.c Thu Mar 23 05:54:45 2023 -0500
@@ -44,9 +44,7 @@
text = talkatu_codeset_coerce_utf8(data, length, &text_length, &real_error);
if(real_error) {
- if(error) {
- *error = real_error;
- }
+ g_propagate_error(error, real_error);
return FALSE;
}
--- a/talkatu/talkatumarkup.c Fri Feb 24 19:39:42 2023 -0600
+++ b/talkatu/talkatumarkup.c Thu Mar 23 05:54:45 2023 -0500
@@ -312,9 +312,7 @@
text = talkatu_codeset_coerce_utf8(data, length, &text_length, &real_error);
if(real_error) {
- if(error) {
- *error = real_error;
- }
+ g_propagate_error(error, real_error);
return FALSE;
}