]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
allocation may fail. CID #1420940
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Nov 2017 21:01:19 +0000 (16:01 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Nov 2017 21:01:19 +0000 (16:01 -0500)
src/modules/rlm_sql/rlm_sql.c

index c526aec73c50bfd4aeadef9dd0cae9f358779721..6b4599809883e6cf4383ac91b9751a28cb230246 100644 (file)
@@ -251,6 +251,8 @@ static int _sql_map_proc_get_value(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *r
        char const      *value = uctx;
 
        vp = fr_pair_afrom_da(ctx, map->lhs->tmpl_da);
+       if (!vp) return -1;
+
        /*
         *      Buffer not always talloced, sometimes it's
         *      just a pointer to a field in a result struct.