mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Avoid estrdup(NULL), modified patch from Zhao ming sen.
This commit is contained in:
parent
9caaee66bd
commit
93962139fb
@ -78,8 +78,16 @@ int error_handler(DBPROCESS *dbproc, int severity, int dberr,
|
||||
if (einfo->dberrstr) {
|
||||
efree(einfo->dberrstr);
|
||||
}
|
||||
einfo->oserrstr = estrdup(oserrstr);
|
||||
einfo->dberrstr = estrdup(dberrstr);
|
||||
if (oserrstr) {
|
||||
einfo->oserrstr = estrdup(oserrstr);
|
||||
} else {
|
||||
einfo->oserrstr = NULL;
|
||||
}
|
||||
if (dberrstr) {
|
||||
einfo->dberrstr = estrdup(dberrstr);
|
||||
} else {
|
||||
einfo->dberrstr = NULL;
|
||||
}
|
||||
|
||||
switch (dberr) {
|
||||
case SYBESEOF:
|
||||
|
Loading…
Reference in New Issue
Block a user