if (stream == NULL && (options & REPORT_ERRORS)) {
char *tmp = estrdup(path);
char *msg;
+ int free_msg = 0;
if (wrapper) {
if (wrapper->err_count) {
strcat(msg, br);
}
+ free_msg = 1;
} else {
msg = strerror(errno);
}
php_strip_url_passwd(tmp);
php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, "failed to create stream: %s", msg);
efree(tmp);
+ if (free_msg)
+ efree(msg);
}
if (wrapper) {
/* tidy up the error stack */