Skip to content

Commit 43f0e3f

Browse files
nielsbbvanassche
authored andcommitted
snmptest: plug a possible memory leak.
1 parent bfc27f6 commit 43f0e3f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/snmptest.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ main(int argc, char *argv[])
185185
}
186186
}
187187
}
188+
if (copy)
189+
snmp_free_pdu(copy);
188190
copy = snmp_clone_pdu(pdu);
189191
if (command == SNMP_MSG_TRAP2) {
190192
/*

0 commit comments

Comments
 (0)