Skip to content

Commit

Permalink
locale.c: Stop Coverity warning
Browse files Browse the repository at this point in the history
Coverity is right, so re-order these clauses.  This code is executed
only if some very strange error occurs.
  • Loading branch information
khwilliamson committed Aug 7, 2019
1 parent 625e8b0 commit 21dce8f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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;
}

Expand Down

0 comments on commit 21dce8f

Please sign in to comment.