summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2023-11-15 13:36:12 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2023-11-15 13:36:12 +0000
commitb6e60861d1bab332c8ac25ce3d31ff09143b2497 (patch)
tree9a5ff4a7b8b2b83636d3375878a76f2abb35101c /usr.sbin/snmpd
parenta143c84ec3e38ae07a7417285a646ff6869e0396 (diff)
Make sure we allocate the correct size for an appl_agentcap.
OK claudio@ miod@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/application.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c
index 916fc8dfae1..5e32e3b9534 100644
--- a/usr.sbin/snmpd/application.c
+++ b/usr.sbin/snmpd/application.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: application.c,v 1.37 2023/11/13 10:14:29 martijn Exp $ */
+/* $OpenBSD: application.c,v 1.38 2023/11/15 13:36:11 martijn Exp $ */
/*
* Copyright (c) 2021 Martijn van Duren <martijn@openbsd.org>
@@ -257,7 +257,7 @@ appl_addagentcaps(const char *ctxname, struct ber_oid *oid, const char *descr,
return APPL_ERROR_UNSUPPORTEDCONTEXT;
}
- if ((cap = malloc(sizeof(*ctx))) == NULL) {
+ if ((cap = malloc(sizeof(*cap))) == NULL) {
log_warn("%s: Can't add agent capabilities %s",
backend->ab_name, oidbuf);
return APPL_ERROR_PROCESSINGERROR;