- **status**: review --> fixed
- **assigned_to**: Vu Minh Nguyen -->  nobody 
- **Comment**:

changeset:   8654:bdc938d5787e
tag:         tip
user:        Vu Minh Nguyen <[email protected]>
date:        Mon Mar 06 16:38:37 2017 +0700
summary:     log: fix leak memory in socket destination handler [#2344]




---

** [tickets:#2344] log: leak memory in unix domain socket destination handler**

**Status:** fixed
**Milestone:** 5.2.RC1
**Created:** Sun Mar 05, 2017 05:41 PM UTC by Vu Minh Nguyen
**Last Updated:** Mon Mar 06, 2017 12:11 PM UTC
**Owner:** nobody


When updating the data store in the configuration handler a dynamic buffer is 
used. Data is added to this buffer using function lgs_cfgupd_list_create() 
which is also used by the help function lgs_cfgupd_mutival_replace(). When the 
buffer is created and expanded when adding more attributes memory is allocated 
that must be freed when the buffer is no longer used. 

In function `void DestinationHandler::UpdateRtDestStatus()`, it uses 
`lgs_cfgupd_mutival_replace()` to update `logRecordDestinationStatus` but not 
freeing buffer at the end of the function.

The allocated buffer needs to be freed by following code line:

```C
  // Free memory allocated for the config_data buffer
  if (config_data.ckpt_buffer_ptr != NULL)
    free(config_data.ckpt_buffer_ptr);
```
 



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to