From: Alan T. DeKok Date: Fri, 10 Nov 2017 21:01:19 +0000 (-0500) Subject: allocation may fail. CID #1420940 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad8b33cb41aa3d382f10b4124c2eb37a228f117c;p=thirdparty%2Ffreeradius-server.git allocation may fail. CID #1420940 --- diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index c526aec73c5..6b459980988 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -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.