]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Added o_stream_unix_write_fd() assert: fd>=0
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 3 May 2016 12:49:00 +0000 (15:49 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 3 May 2016 12:49:00 +0000 (15:49 +0300)
src/lib/ostream-unix.c

index 9280c90ee941a9308c506f6b88749cccce366945..e5d673ce5317536082459b0b92ed1612a40ef794 100644 (file)
@@ -83,6 +83,8 @@ bool o_stream_unix_write_fd(struct ostream *output, int fd)
        struct unix_ostream *ustream =
                (struct unix_ostream *)output->real_stream;
 
+       i_assert(fd >= 0);
+
        if (ustream->write_fd >= 0)
                return FALSE;
        ustream->write_fd = fd;