http://defect.opensolaris.org/bz/show_bug.cgi?id=10380
Summary: memory leak in nwam_record_audit_event()
Classification: Development
Product: nwam
Version: unspecified
Platform: ANY/Generic
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: ON library
AssignedTo: nwam-dev at opensolaris.org
ReportedBy: Anurag.Maskey at Sun.COM
QAContact: nwam-dev at opensolaris.org
Must adt_end_session() when edata allocation fails.
Also, edata must be freed if the eid doesn't match any of the cases.
@@ -45,8 +45,10 @@
return;
}
- if ((edata = adt_alloc_event(ah, eid)) == NULL)
+ if ((edata = adt_alloc_event(ah, eid)) == NULL) {
+ (void) adt_end_session(ah);
return;
+ }
switch (eid) {
case ADT_nwam_enable:
@@ -66,11 +68,12 @@
edata->adt_netcfg_remove.parent_file = descr_arg;
break;
default:
- return;
+ goto fail;
}
(void) adt_put_event(edata, status, error);
+
+fail:
adt_free_event(edata);
-
(void) adt_end_session(ah);
}
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.