summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index d6a0b30f7cb..35f6e3b548f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6095,7 +6095,10 @@ read_process_output (Lisp_Object proc, int channel)
if (nbytes <= 0)
{
if (nbytes < 0 || coding->mode & CODING_MODE_LAST_BLOCK)
- return SAFE_FREE_UNBIND_TO (count, nbytes);
+ {
+ SAFE_FREE_UNBIND_TO (count, Qnil);
+ return nbytes;
+ }
coding->mode |= CODING_MODE_LAST_BLOCK;
}