mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
- now that we fdopen() message file descriptor, do not forget to fclose()
This commit is contained in:
parent
a302c703d8
commit
756d3a0185
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: store.c,v 1.4 2008/11/10 16:33:07 gilles Exp $ */
|
||||
/* $OpenBSD: store.c,v 1.5 2008/11/11 20:59:11 gilles Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
|
||||
@ -235,6 +235,7 @@ store_write_daemon(struct batch *batchp, struct message *messagep)
|
||||
fflush(mboxfp);
|
||||
fsync(fileno(mboxfp));
|
||||
fclose(mboxfp);
|
||||
fclose(messagefp);
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
@ -274,6 +275,7 @@ store_write_message(struct batch *batchp, struct message *messagep)
|
||||
fflush(mboxfp);
|
||||
fsync(fileno(mboxfp));
|
||||
fclose(mboxfp);
|
||||
fclose(messagefp);
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
@ -302,6 +304,5 @@ store_message(struct batch *batchp, struct message *messagep,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user