]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't leak memory on error conditions (#4947)
authorJorge Pereira <jpereira@users.noreply.github.com>
Tue, 28 Mar 2023 22:42:45 +0000 (19:42 -0300)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 22:42:45 +0000 (16:42 -0600)
src/modules/rlm_csv/rlm_csv.c

index 799a3b3b55313488e4ae4ec8b6e9769c4a5483c8..c1c5c8f77796c6390de601d7f9e02813b35663ce 100644 (file)
@@ -861,6 +861,7 @@ static int csv_map_getvalue(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *req
                da = fr_dict_attr_by_name(NULL, fr_dict_root(request->dict), attr);
                if (!da) {
                        RWDEBUG("No such attribute '%s'", attr);
+                       talloc_free(attr);
                        return -1;
                }