mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed potential use of un-initialized var (detected by Coverity)
This commit is contained in:
parent
24b2efa342
commit
8b8eb2cf88
@ -1553,6 +1553,11 @@ register struct re_guts *g;
|
|||||||
if (g->mlen == 0) /* there isn't one */
|
if (g->mlen == 0) /* there isn't one */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!start) {
|
||||||
|
g->mlen = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* turn it into a character string */
|
/* turn it into a character string */
|
||||||
g->must = malloc((size_t)g->mlen + 1);
|
g->must = malloc((size_t)g->mlen + 1);
|
||||||
if (g->must == NULL) { /* argh; just forget it */
|
if (g->must == NULL) { /* argh; just forget it */
|
||||||
|
@ -1553,6 +1553,11 @@ register struct re_guts *g;
|
|||||||
if (g->mlen == 0) /* there isn't one */
|
if (g->mlen == 0) /* there isn't one */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!start) {
|
||||||
|
g->mlen = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* turn it into a character string */
|
/* turn it into a character string */
|
||||||
g->must = malloc((size_t)g->mlen + 1);
|
g->must = malloc((size_t)g->mlen + 1);
|
||||||
if (g->must == NULL) { /* argh; just forget it */
|
if (g->must == NULL) { /* argh; just forget it */
|
||||||
|
Loading…
Reference in New Issue
Block a user