]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
allocation can fail. CID #1420935
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Nov 2017 20:57:45 +0000 (15:57 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Nov 2017 20:57:45 +0000 (15:57 -0500)
src/main/radsnmp.c

index 6a59c38ffaf8766c30665ffd8940b84cca51b70f..297f42e8998af6ab8a46bf16d59f4ef9031720a8 100644 (file)
@@ -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);