[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 1/3] shell: plug SH_MATH_ERROR_TRACK memory leak
From: Steffen Nurpmeso <steffen () sdaoden ! eu>
Date: 2022-08-26 17:04:59
Message-ID: 35b945a55556e098ca7fbb0967562e4b53f70f43.1661533052.git.steffen () sdaoden ! eu
[Download RAW message or body]
---
Hello.
I have to come back unfortunately with this memory plug fix in
case SH_MATCH_ERROR_TRACK is enabled.
The second patch sync shexp-arith.h with my local version, i made
a review and that changed some comments, i did a logical code
reorder, and one superfluous value toggle i removed, too.
The second patch simply adds my mailer's $(( )) test script to the
busybox test ones! So easy it could have been. Note i never ran
hush_test/hush-arith, only ash_test/ash-arith.
shell/math.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/shell/math.c b/shell/math.c
index b9b3d7acb1..8ba0d2f7fb 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -273,6 +273,9 @@ arith(arith_state_t *math_state, const char *expr)
emsg
#endif
;
+#if ENABLE_FEATURE_SH_MATH_ERROR_TRACK
+ free(err_rest);
+#endif
return -1;
}
--
2.37.2
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic