Skip to content

Commit 21dce8f

Browse files
committed
locale.c: Stop Coverity warning
Coverity is right, so re-order these clauses. This code is executed only if some very strange error occurs.
1 parent 625e8b0 commit 21dce8f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

locale.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4349,11 +4349,6 @@ Perl__mem_collxfrm(pTHX_ const char *input_string,
43494349
return xbuf;
43504350

43514351
bad:
4352-
Safefree(xbuf);
4353-
if (s != input_string) {
4354-
Safefree(s);
4355-
}
4356-
*xlen = 0;
43574352

43584353
# ifdef DEBUGGING
43594354

@@ -4363,6 +4358,12 @@ Perl__mem_collxfrm(pTHX_ const char *input_string,
43634358

43644359
# endif
43654360

4361+
Safefree(xbuf);
4362+
if (s != input_string) {
4363+
Safefree(s);
4364+
}
4365+
*xlen = 0;
4366+
43664367
return NULL;
43674368
}
43684369

0 commit comments

Comments
 (0)