Skip to content
Snippets Groups Projects
Commit 0c89a974 authored by Alexandr Lyapunov's avatar Alexandr Lyapunov
Browse files

*) merge with 1.5 - possibe fix of OPENTAR-97

*) fixed potentionally unsafe code:
  on memory fail there could be port->found > 0 and uninitialized port->svp
parent fb83bc17
No related branches found
No related tags found
No related merge requests found
......@@ -148,10 +148,11 @@ static inline void
iproto_port_add_tuple(struct port *ptr, struct tuple *tuple)
{
struct iproto_port *port = iproto_port(ptr);
if (++port->found == 1) {
if (port->found == 0) {
/* Found the first tuple, add header. */
port->svp = iproto_prepare_select(port->buf);
}
port->found++;
tuple_to_obuf(tuple, port->buf);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment