Commit 332912ea authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

Stdio.Buffer: Put null in a freed io->output.u.object.

parent 9c4f6928
......@@ -990,8 +990,10 @@ PIKECLASS Buffer
if (f)
assign_svalue(&io->output, f);
else {
if (io->output.u.object)
if (io->output.u.object) {
free_svalue(&io->output);
io->output.u.object = 0; // free_svalue() puts in -1
}
SET_SVAL(io->output, PIKE_T_INT, NUMBER_NUMBER, integer, 0);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment