X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fsnmp_agent.c;h=2dfa6613d6b253d696da5ab99ed366c0eaad0c2e;hp=1c7191ff8bbcad612e0a410163d37798a2e48816;hb=c494d2b91a1476275689c5ea6f1cf10f388221b9;hpb=2cbbf2a166cba72b94e80eb55f029e1a4901823e diff --git a/src/snmp_agent.c b/src/snmp_agent.c index 1c7191ff..2dfa6613 100644 --- a/src/snmp_agent.c +++ b/src/snmp_agent.c @@ -2202,8 +2202,7 @@ static int snmp_agent_register_oid(oid_t *oid, Netsnmp_Node_Handler *handler) { if (c_avl_get(g_agent->registered_oids, (void *)oid, NULL) == 0) return OID_EXISTS; else { - oid_t *new_oid = calloc(1, sizeof(*oid)); - + oid_t *new_oid = calloc(1, sizeof(*new_oid)); if (new_oid == NULL) { ERROR(PLUGIN_NAME ": Could not allocate memory to register new OID"); return -ENOMEM;