Commit 2e01f9bd authored by Kirill Smelkov's avatar Kirill Smelkov

libgolang: select: zero-out waitv before freeing

Like we already do for e.g. _chan, to increase probability that if
something is used after free we get a NULL-dereference crash instead of
more hard-to-understand segfault.
parent 5aa1e899
......@@ -1047,6 +1047,7 @@ static int __chanselect2(const _selcase *casev, int casec, const vector<int>& nv
w->chan->_mu.unlock(); // it is ok to del twice even if w was already removed
}
bzero((void *)waitv, waitc*sizeof(waitv[0]));
free(waitv);
waitv = NULL;
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment