aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/mail/mesg.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-03-03 14:13:22 +0000
committerrsc <devnull@localhost>2006-03-03 14:13:22 +0000
commit1190a7aa7a1dba5964688c4bb8ee09fc8930c488 (patch)
tree89004fe2e781981ba1ecaad04e9627e445a56a2f /src/cmd/acme/mail/mesg.c
parentfe02cd59570492c457b3e953ae4f95f7c896cd96 (diff)
downloadplan9port-1190a7aa7a1dba5964688c4bb8ee09fc8930c488.tar.gz
plan9port-1190a7aa7a1dba5964688c4bb8ee09fc8930c488.tar.bz2
plan9port-1190a7aa7a1dba5964688c4bb8ee09fc8930c488.zip
more updates
Diffstat (limited to 'src/cmd/acme/mail/mesg.c')
-rw-r--r--src/cmd/acme/mail/mesg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c
index 55a65b4a..0d894d93 100644
--- a/src/cmd/acme/mail/mesg.c
+++ b/src/cmd/acme/mail/mesg.c
@@ -347,6 +347,11 @@ readfile(char *dir, char *name, int *np)
free(d);
data = emalloc(len+1);
len = fsreadn(fid, data, len);
+ if(len <= 0){
+ fsclose(fid);
+ free(data);
+ return nil;
+ }
fsclose(fid);
if(np != nil)
*np = len;