--- agent/mibgroup/host/data_access/swrun_kinfo.c.orig 2017-05-04 20:37:09.650803000 +0200 +++ agent/mibgroup/host/data_access/swrun_kinfo.c 2017-05-04 20:38:46.640120000 +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,11 @@ 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); + } + /* * There are two possible sources for the command being run: