diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-12-13 10:22:57 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-12-13 10:29:16 +0900 |
| commit | 8a74b2a25d5a0b66326d9642567fef894ea90d10 (patch) | |
| tree | e62980da977db485c2e6ce148ae724fb8791f4cc /src/dump.c | |
| parent | d01707d4cf53bef1121bc1c7c9ce735d28ab5be3 (diff) | |
| download | mruby-8a74b2a25d5a0b66326d9642567fef894ea90d10.tar.gz mruby-8a74b2a25d5a0b66326d9642567fef894ea90d10.zip | |
string-ext/string.c: fixed memory leak from `tr` on exception.
With some refactoring.
* `ret` argument is always non-nil, so no check needed.
* move allocation check right after malloc().
* simplify conditions.
Diffstat (limited to 'src/dump.c')
0 files changed, 0 insertions, 0 deletions
