mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
[Core] Fix possible leak of the subclass variable in CUSTOM_HASH'es switch_event_reserve_subclass_detailed().
This commit is contained in:
1 parent
d32e7f1973
commit
8dd27183f8
3 files changed
+18
-1
No files matched your search
+7
-1
@@ -503,7 +503,13 @@ SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(const cha
|
||||
subclass->owner = DUP(owner);
|
||||
subclass->name = DUP(subclass_name);
|
||||
|
||||
switch_core_hash_insert(CUSTOM_HASH, subclass->name, subclass);
|
||||
status = switch_core_hash_insert(CUSTOM_HASH, subclass->name, subclass);
|
||||
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
free(subclass->owner);
|
||||
free(subclass->name);
|
||||
free(subclass);
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
|
||||
Reference in new issue
Block a user