From: Alan T. DeKok Date: Mon, 11 Apr 2022 23:44:23 +0000 (-0400) Subject: check for NULL. CID #1503997 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2161e2746e352398efb788fa047ab4c43ed3860;p=thirdparty%2Ffreeradius-server.git check for NULL. CID #1503997 --- diff --git a/src/modules/rlm_csv/rlm_csv.c b/src/modules/rlm_csv/rlm_csv.c index 7620d7c718b..37453281eee 100644 --- a/src/modules/rlm_csv/rlm_csv.c +++ b/src/modules/rlm_csv/rlm_csv.c @@ -312,6 +312,8 @@ static bool file2csv(CONF_SECTION *conf, rlm_csv_t *inst, int lineno, char *buff * Set the last entry to use 'e' */ e->key = fr_value_box_alloc_null(e); + if (!e->key) goto fail; + if (fr_value_box_from_str(e->key, e->key, type, NULL, p, strlen(p), NULL, false) < 0) { cf_log_err(conf, "Failed parsing key field in file %s line %d - %s", inst->filename, lineno,