Otherwise if a service connection (which does not have buffers) attempts
to use buffers, '*bufferp' will be uninitialized, which can cause a
segfault in the caller.
Found using OFtest configured to use service (active rather than passive)
connections.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
if (!pb) {
VLOG_WARN_RL(&rl, "attempt to send buffered packet via connection "
"without buffers");
- return OFPERR_OFPBRC_BUFFER_UNKNOWN;
+ error = OFPERR_OFPBRC_BUFFER_UNKNOWN;
+ goto error;
}
p = &pb->packets[id & PKTBUF_MASK];