From: Alan T. DeKok Date: Fri, 10 Nov 2017 20:57:45 +0000 (-0500) Subject: allocation can fail. CID #1420935 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd33ea2d1e4ec9f25bd020c2ab5120d98012f84;p=thirdparty%2Ffreeradius-server.git allocation can fail. CID #1420935 --- diff --git a/src/main/radsnmp.c b/src/main/radsnmp.c index 6a59c38ffaf..297f42e8998 100644 --- a/src/main/radsnmp.c +++ b/src/main/radsnmp.c @@ -333,6 +333,10 @@ static ssize_t radsnmp_pair_from_oid(TALLOC_CTX *ctx, radsnmp_conf_t *conf, vp_c } vp = fr_pair_afrom_da(ctx, conf->snmp_type); + if (!vp) { + slen = -(slen); + goto error; + } vp->vp_uint32 = type; fr_pair_cursor_append(cursor, vp);