Date: Fri, 22 Apr 2016 06:01:11 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298452 - head/usr.sbin/bsnmpd/tools/libbsnmptools Message-ID: <201604220601.u3M61Btd097957@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Apr 22 06:01:11 2016 New Revision: 298452 URL: https://svnweb.freebsd.org/changeset/base/298452 Log: Don't try to free `string` (stack allocated char[]) Fix minor style with warnx call while in the neighborhood MFC after: 1 week CID: 1009683 Reported by: Coverity, gcc 5.x Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri Apr 22 05:52:40 2016 (r298451) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri Apr 22 06:01:11 2016 (r298452) @@ -1079,10 +1079,9 @@ snmp_oid2asn_oid(struct snmp_toolinfo *s strlcpy(string, str, i + 1); string[i] = '\0'; if (snmp_lookup_enumoid(snmptoolctx, &obj, string) < 0) { - warnx("Unknown string - %s",string); + warnx("Unknown string - %s", string); return (NULL); } - free(string); } asn_append_oid(oid, &(obj.val.var));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604220601.u3M61Btd097957>