From 7beaaa1cb3514c15313931f451510208264320b1 Mon Sep 17 00:00:00 2001 From: Suchang Woo Date: Fri, 17 Jul 2015 21:02:40 +0900 Subject: [PATCH] common: fix segfault issue When vconf APIs is invoked in callback function, client's receive buffer which is already full is used again. This makes an abnormal state. Before invoking callback function, full buffer should be removed from receive buffer list. Change-Id: Ie47cca364dfc03fde14aad3e7d156b394cf0a675 Signed-off-by: Suchang Woo --- common/proto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/proto.c b/common/proto.c index b87e396..d0ab261 100644 --- a/common/proto.c +++ b/common/proto.c @@ -144,6 +144,7 @@ static int recv_cont(struct recv_info *rif) bxt_dbg("rif %p received %d / %d", rif, rif->recved, rif->len); assert(rif->callback); + recv_list = g_list_remove(recv_list, rif); rif->callback(rif->user_data, rif->type, rif->data, rif->len); remove_rif(rif); } -- 2.7.4