]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
i9e: Zero out private pointer on open.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 8 Mar 2016 23:21:15 +0000 (00:21 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 1 Apr 2016 23:40:15 +0000 (01:40 +0200)
This should not matter at the moment since i9e_open() is only called
once and the i9e_private structure is static, so it's already zeroed
out by the first time the function is called. But since the ie9 API
is supposed to work across multiple open/close cycles, it seems wise
to be conservative here.

interactive.c

index ce48af329e45c31961a0a39dbba3b975d67ec207..b5ee797717f8602f5f086411df4e6e63ef735d88 100644 (file)
@@ -440,6 +440,7 @@ int i9e_open(struct i9e_client_info *ici, struct sched *s)
 {
        int ret;
 
+       memset(i9ep, 0, sizeof(struct i9e_private));
        if (!isatty(ici->fds[0]))
                return -E_I9E_SETUPTERM;
        ret = mark_fd_nonblocking(ici->fds[0]);