summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-08-20 22:08:55 +0000
committerWez Furlong <wez@php.net>2002-08-20 22:08:55 +0000
commit03b8214b9d93523b3a242cd3ddbfda2a4308f808 (patch)
treee37d63d7f2306fbba5c638f876d564e868a341de /main
parent9d348ea80059301a099b8f3dce25429c0760666d (diff)
downloadphp-git-03b8214b9d93523b3a242cd3ddbfda2a4308f808.tar.gz
Fix newly introduced leak in the debug build.
Diffstat (limited to 'main')
-rwxr-xr-xmain/streams.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/main/streams.c b/main/streams.c
index 0cfe5d38b3..c760b9bf33 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -163,15 +163,21 @@ fprintf(stderr, "stream_free: %s:%p in_free=%d opts=%08x\n", stream->ops->label,
* of stream it was. */
char leakbuf[512];
snprintf(leakbuf, sizeof(leakbuf), __FILE__ "(%d) : Stream of type '%s' 0x%08X (path:%s) was not closed\n", __LINE__, stream->ops->label, (unsigned int)stream, stream->__orig_path);
+
+ STR_FREE(stream->__orig_path);
+
# if defined(PHP_WIN32)
OutputDebugString(leakbuf);
# else
fprintf(stderr, leakbuf);
# endif
+ } else {
+ STR_FREE(stream->__orig_path);
+ pefree(stream, stream->is_persistent);
}
- else
-#endif
+#else
pefree(stream, stream->is_persistent);
+#endif
}
return ret;