In case a bulk-in transfer-buffer allocation failed during probe, we'd
currently leak the corresponding URB.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
retval = -ENOMEM;
goto error;
}
+ cport_in->urb[i] = urb;
+
buffer = kmalloc(ES2_GBUF_MSG_SIZE_MAX, GFP_KERNEL);
if (!buffer) {
retval = -ENOMEM;
cport_in->endpoint),
buffer, ES2_GBUF_MSG_SIZE_MAX,
cport_in_callback, hd);
- cport_in->urb[i] = urb;
+
cport_in->buffer[i] = buffer;
}
}
retval = -ENOMEM;
goto error;
}
+ es2->arpc_urb[i] = urb;
+
buffer = kmalloc(ARPC_IN_SIZE_MAX, GFP_KERNEL);
if (!buffer) {
retval = -ENOMEM;
buffer, ARPC_IN_SIZE_MAX,
arpc_in_callback, es2);
- es2->arpc_urb[i] = urb;
es2->arpc_buffer[i] = buffer;
}