Return -1 if we can't allocate memory for node for request data
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 12 Dec 2014 18:03:04 +0000 (13:03 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 12 Dec 2014 18:31:54 +0000 (13:31 -0500)
src/main/util.c

index aaf8f70..9bdfd6f 100644 (file)
@@ -125,6 +125,7 @@ int request_data_add(REQUEST *request, void *unique_ptr, int unique_int, void *o
         *      an existing entry.
         */
        if (!this) this = talloc_zero(request, request_data_t);
+       if (!this) return -1;
 
        this->next = next;
        this->unique_ptr = unique_ptr;