From 69236fd49a0dc1f5ea95da2a1f9722f2a96bcf0c Mon Sep 17 00:00:00 2001 From: Ravi kumar Veeramally Date: Tue, 23 Aug 2016 12:33:45 +0300 Subject: [PATCH] net: Fix net_send return value documentation If net_send() is success, do not unref the buffer. Free the buf when it returns error. Change-Id: Ic154879dfb583d52a0b12fd3e8bfc390a24efec9 Signed-off-by: Ravi kumar Veeramally --- include/net/uip/net_socket.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/uip/net_socket.h b/include/net/uip/net_socket.h index 7f4eaee5aff..336770e0854 100644 --- a/include/net/uip/net_socket.h +++ b/include/net/uip/net_socket.h @@ -88,7 +88,8 @@ void net_context_put(struct net_context *context); * * @param buf Network buffer. * - * @return 0 if ok, <0 if error. + * @return 0 if ok (do not unref the buf), + * <0 if error (unref the buf). */ int net_send(struct net_buf *buf);