소스 검색

Free mutex prior to freeing conn

The worker_thread_run will handle freeing the mutex in a server context
Jacob Skillin 9 년 전
부모
커밋
c793d57105
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -10971,9 +10971,9 @@ mg_close_connection(struct mg_connection *conn)
 		}
 		mg_free(client_ctx->workerthreadids);
 		mg_free(client_ctx);
+		(void)pthread_mutex_destroy(&conn->mutex);
 		mg_free(conn);
 	}
-	(void)pthread_mutex_destroy(&conn->mutex);
 }