From 0bdacd3e772ca0732fded8c655436ca902339f24 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 12 Feb 2015 23:02:17 +0900 Subject: [PATCH] Code cleanup --- lib/nghttp2_session.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 5ee5483a..05cdf722 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -2664,15 +2664,14 @@ static ssize_t nghttp2_session_mem_send_internal(nghttp2_session *session, /* The library is responsible for the transmission of WINDOW_UPDATE frame, so we don't call error callback for it. */ - if (frame->hd.type != NGHTTP2_WINDOW_UPDATE) { - if (session->callbacks.on_frame_not_send_callback( - session, frame, rv, session->user_data) != 0) { + if (frame->hd.type != NGHTTP2_WINDOW_UPDATE && + session->callbacks.on_frame_not_send_callback( + session, frame, rv, session->user_data) != 0) { - nghttp2_outbound_item_free(item, mem); - nghttp2_mem_free(mem, item); + nghttp2_outbound_item_free(item, mem); + nghttp2_mem_free(mem, item); - return NGHTTP2_ERR_CALLBACK_FAILURE; - } + return NGHTTP2_ERR_CALLBACK_FAILURE; } /* We have to close stream opened by failed request HEADERS or PUSH_PROMISE. */