[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-dev] [Bug 73] New: [PATCH] Fix for some memory and descriptors leaks
http://www.ossec.net/bugs/show_bug.cgi?id=73
Summary: [PATCH] Fix for some memory and descriptors leaks
Product: OSSEC
Version: 1.3
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P1
Component: ossec core
AssignedTo: ossec-dev@xxxxxxxxx
ReportedBy: php-coder@xxxxxxxxxxxx
Hello!
I have patch which fixes some memory/descriptor leaks. Some of this are
possible when error occurs, but some exists always. Please strictly check and
test patch and correct me if I wrong. (Patch silently applies for 20070909
snapshot..)
For understand me and my logic I post my short changelog:
src/addagent/manage_agents.c(add_agent): fixed memory leak when fopen() fails.
Move code for allocation memory after manipulation with file.
src/addagent/manage_keys.c(k_extract): fixed file descriptor leak after
fopen().
src/addagent/manage_keys.c(k_import): fixed memory leak (after decode_base64()
usage).
src/addagent/manage_agents.c(remove_agent): fixed memory leak when fopen()
fails.
Move memory allocation after manipulation with file. Also add XXX entry.
src/addagent/validate.c(getFullnameById): fixed file descriptor leak when
os_calloc() fails.
Call fopen() before os_calloc() because it may be fails also.
src/analysisd/alerts/getloglocation.c(OS_GetLogLocation): fixed decriptor leaks
when any erorr occurs.
src/analysisd/analysisd.c(DumpLogstats): don't forget call fclose() when error
occurs.
src/config/active-response.c(ReadActiveResponses): free memory and close file
descriptor when error occurs.
src/os_execd/exec.c(ReadExecConfig): fixed file descriptor leak.
src/win32/extract-win-el.c(main): fixed file descriptor leak.
Patch will be attached.
--
Configure bugmail: http://www.ossec.net/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.