From d5a98f2fd1970aec2ea73c95da73d9ecd0c15d33 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 7 Sep 2012 11:00:56 +0300 Subject: gweb: Don't use debug functionality after possible free When the callback has been called, the whole structure might be freed. Thus don't call the debug function tied to the structure. --- gweb/gweb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gweb') diff --git a/gweb/gweb.c b/gweb/gweb.c index 27ed6347..4c2f95c1 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -434,7 +434,6 @@ gboolean g_web_get_close_connection(GWeb *web) static inline void call_result_func(struct web_session *session, guint16 status) { - gboolean result; if (session->result_func == NULL) return; @@ -442,10 +441,8 @@ static inline void call_result_func(struct web_session *session, guint16 status) if (status != 0) session->result.status = status; - result = session->result_func(&session->result, session->user_data); + session->result_func(&session->result, session->user_data); - debug(session->web, "[result function] %s", - result == TRUE ? "continue" : "stop"); } static inline void call_route_func(struct web_session *session) -- cgit v1.2.3