- **status**: accepted --> review


---

** [tickets:#1085] imm: memory leak in finalizeSync**

**Status:** review
**Milestone:** 4.3.3
**Created:** Mon Sep 15, 2014 02:03 PM UTC by Zoran Milinkovic
**Last Updated:** Mon Sep 22, 2014 11:04 AM UTC
**Owner:** Neelakanta Reddy

In ImmModel::finalize Sync, memory is not deleted for CcbInfo and 
AdminOwnerInfo structs, if errors happen in the same block.

For AdminOwnerInfo:

                AdminOwnerInfo* info = new AdminOwnerInfo;

                ...

                if((info->mDying) && (!(info->mReleaseOnFinalize))) {
                    LOG_ER("finalizeSync client: Admo is dying yet 
releaseOnFinalize is false");
                    err = SA_AIS_ERR_FAILED_OPERATION;
                    goto done; 
                }

                ...

                    if(oi == sObjectMap.end()) {
                        LOG_ER("Sync client failed to locate object: "
                            "%s, will restart.", objectName.c_str());
                        err = SA_AIS_ERR_FAILED_OPERATION;
                        goto done; 
                    }     

For CcbInfo:

                CcbInfo* newCcb = new CcbInfo;

                ...

                if(newCcb->mWaitStartTime <= ((time_t) 0)) {
                    LOG_ER("newCcb->mWaitStartTime <= 0");
                    err = SA_AIS_ERR_FAILED_OPERATION;
                    goto done;
                }

                ...

                if((newCcb->isActive())) {
                    LOG_ER("Can not sync Ccb that is active");
                    err = SA_AIS_ERR_FAILED_OPERATION;
                    goto done;
                }



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net 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.
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to