From 882014071f0e6747be35ceea71fef806f0c22588 Mon Sep 17 00:00:00 2001 From: zhangl1 Date: Fri, 12 Oct 2012 11:12:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=91=E9=9D=9E=E6=B3=95?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=8F=91=E6=B6=88=E6=81=AF=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复想非法会话发送消息时的内存泄漏 2. Signed-off-by: zhangl1 --- Makefile | 2 +- src/iolayer.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 85eb11a..117e6e2 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SOFLAGS = -shared -Wl LIBNAME = libevlite.so SONAME = $(LIBNAME).3 -REALNAME= $(LIBNAME).3.0.7 +REALNAME= $(LIBNAME).3.0.8 OS = $(shell uname) diff --git a/src/iolayer.c b/src/iolayer.c index 25b3dce..49a5e40 100644 --- a/src/iolayer.c +++ b/src/iolayer.c @@ -730,6 +730,8 @@ int32_t _send_direct( struct session_manager * manager, struct task_send * task if ( session == NULL ) { syslog(LOG_WARNING, "_send_direct(SID=%ld) failed, the Session is invalid .", task->id ); + + free( task->buf ); return -1; }