Skip to content

Commit c92a0eb

Browse files
ProjectMutilationbvanassche
authored andcommitted
Perl: added deallocation of session in error handling path
Found by RASU JSC Signed-off-by: Maxim Korotkov <[email protected]>
1 parent 759421b commit c92a0eb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

perl/SNMP/SNMP.xs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,7 @@ snmp_new_tunneled_session(version, peer, retries, timeout, sec_name, sec_level,
28032803
if (!session.transport_configuration) {
28042804
fprintf(stderr, "failed to initialize the transport configuration container\n");
28052805
RETVAL = NULL;
2806+
netsnmp_cleanup_session(&session);
28062807
return;
28072808
}
28082809

0 commit comments

Comments
 (0)