]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
da may be NULL
authorAlan T. DeKok <aland@freeradius.org>
Mon, 23 Jan 2017 19:44:31 +0000 (14:44 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 23 Jan 2017 19:44:31 +0000 (14:44 -0500)
src/lib/dict.c

index 3f66286ffbb86b14f33484d7a974e92fa45e43f7..3019716880076fd5cced5ecf14e05e8f88adb530 100644 (file)
@@ -3195,7 +3195,14 @@ int fr_dict_unknown_from_oid(fr_dict_t *dict, fr_dict_attr_t *vendor_da, fr_dict
        /*
         *      The common case: Attr-26.  Just create it and go.
         */
-       if (!*p) return fr_dict_unknown_from_fields(da, parent, 0, attr);
+       if (!*p) {
+               if (!da) {
+                       fr_strerror_printf("Failed creating attribute");
+                       return -1;
+               }
+
+               return fr_dict_unknown_from_fields(da, parent, 0, attr);
+       }
 
        /*
         *      Allow only Attr-%d.%d.%d