diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2013-05-07 09:32:59 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2013-05-07 09:32:59 +0000 |
commit | 6b13d5b94c23c449ff2e3169f52031933ffd3fc5 (patch) | |
tree | f11b94d553648a31b2d0cc8e83bc14e77be26824 /usr.sbin | |
parent | 0a7cd0edaf81d97a3de566af9ce8395645865ede (diff) |
alloc the size of the struct not the size of a pointer to it
ok reyk@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/snmpctl/snmpctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpctl/snmpctl.c b/usr.sbin/snmpctl/snmpctl.c index d72af9fb1be..d7c50fa9c5f 100644 --- a/usr.sbin/snmpctl/snmpctl.c +++ b/usr.sbin/snmpctl/snmpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpctl.c,v 1.14 2012/09/17 16:43:59 reyk Exp $ */ +/* $OpenBSD: snmpctl.c,v 1.15 2013/05/07 09:32:58 jsg Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -89,7 +89,7 @@ main(int argc, char *argv[]) int ch; const char *sock = SNMPD_SOCKET; - if ((env = calloc(1, sizeof(struct snmpd *))) == NULL) + if ((env = calloc(1, sizeof(struct snmpd))) == NULL) err(1, "calloc"); gettimeofday(&env->sc_starttime, NULL); |