FreeBSD Bugzilla – Attachment 182307 Details for
Bug 219072
net-mgmt/net-snmp: memory leak in swrun_kinfo.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for agent/mibgroup/host/data_access/swrun_kinfo.c (fixed)
patch-agent_mibgroup_host_data__access_swrun__kinfo.c (text/plain), 980 bytes, created by
Markus Wennrich
on 2017-05-04 20:10:26 UTC
(
hide
)
Description:
patch for agent/mibgroup/host/data_access/swrun_kinfo.c (fixed)
Filename:
MIME Type:
Creator:
Markus Wennrich
Created:
2017-05-04 20:10:26 UTC
Size:
980 bytes
patch
obsolete
>--- agent/mibgroup/host/data_access/swrun_kinfo.c.orig 2014-12-08 21:23:22.000000000 +0100 >+++ agent/mibgroup/host/data_access/swrun_kinfo.c 2017-05-04 22:06:00.411160000 +0200 >@@ -176,7 +176,7 @@ > netsnmp_arch_swrun_container_load( netsnmp_container *container, u_int flags) > { > struct SWRUN_TABLE *proc_table; >- int nprocs, i, rc; >+ int nprocs, i; > char buf[BUFSIZ+1], **argv; > netsnmp_swrun_entry *entry; > >@@ -203,7 +203,12 @@ > entry = netsnmp_swrun_entry_create(proc_table[i].SWRUN_K_PID); > if (NULL == entry) > continue; /* error already logged by function */ >- rc = CONTAINER_INSERT(container, entry); >+ if ( -1 == CONTAINER_INSERT(container, entry)) { >+ // entry didn't get inserted (duplicate key) >+ free(entry); >+ continue; >+ } >+ > > /* > * There are two possible sources for the command being run:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219072
:
182305
| 182307