This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
625e8b0
)
locale.c: Stop Coverity warning
author
Karl Williamson
<khw@cpan.org>
Wed, 7 Aug 2019 03:29:22 +0000
(21:29 -0600)
committer
Karl Williamson
<khw@cpan.org>
Wed, 7 Aug 2019 03:33:00 +0000
(21:33 -0600)
Coverity is right, so re-order these clauses. This code is executed
only if some very strange error occurs.
locale.c
patch
|
blob
|
blame
|
history
diff --git
a/locale.c
b/locale.c
index
db83d99
..
af7af60
100644
(file)
--- a/
locale.c
+++ b/
locale.c
@@
-4349,11
+4349,6
@@
Perl__mem_collxfrm(pTHX_ const char *input_string,
return xbuf;
bad:
- Safefree(xbuf);
- if (s != input_string) {
- Safefree(s);
- }
- *xlen = 0;
# ifdef DEBUGGING
@@
-4363,6
+4358,12
@@
Perl__mem_collxfrm(pTHX_ const char *input_string,
# endif
+ Safefree(xbuf);
+ if (s != input_string) {
+ Safefree(s);
+ }
+ *xlen = 0;
+
return NULL;
}