From c2c35a733098687a885c03e7b52de4e9fa171777 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 22 Jul 2020 14:27:03 +0800 Subject: [PATCH] Refine code --- trunk/src/app/srs_app_listener.cpp | 2 +- trunk/src/protocol/srs_service_log.hpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_listener.cpp b/trunk/src/app/srs_app_listener.cpp index fa7bfbfb6..313be0b17 100755 --- a/trunk/src/app/srs_app_listener.cpp +++ b/trunk/src/app/srs_app_listener.cpp @@ -541,7 +541,7 @@ srs_error_t SrsUdpMuxListener::cycle() if (err != srs_success) { // remux udp never return srs_warn("udp packet handler error:%s", srs_error_desc(err).c_str()); - srs_error_reset(err); + srs_freep(err); } pprint->elapse(); diff --git a/trunk/src/protocol/srs_service_log.hpp b/trunk/src/protocol/srs_service_log.hpp index 539599c42..6a4e14568 100644 --- a/trunk/src/protocol/srs_service_log.hpp +++ b/trunk/src/protocol/srs_service_log.hpp @@ -52,8 +52,7 @@ public: // The context restore stores the context and restore it when done. // Usage: // SrsContextRestore(_srs_context->get_id()); -#define SrsContextRestore(cid) \ - impl_SrsContextRestore _context_restore_instance(cid) +#define SrsContextRestore(cid) impl_SrsContextRestore _context_restore_instance(cid) class impl_SrsContextRestore { private: