]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Wrap malloc() in MEM() to reassure coverity (CID #1469117) (#4485)
authorJames Jones <jejones3141@gmail.com>
Thu, 5 May 2022 21:54:42 +0000 (16:54 -0500)
committerGitHub <noreply@github.com>
Thu, 5 May 2022 21:54:42 +0000 (23:54 +0200)
src/bin/radmin.c

index 9f364aeddd8acaafeb574a23c7c87d1c0e84b5f0..f38a68e295020ad35430962bb51cbe2c04e8363f 100644 (file)
@@ -688,7 +688,7 @@ static int tab_expand_config_thing(TALLOC_CTX *talloc_ctx, UNUSED void *ctx, fr_
                if (!fr_command_strncmp(text, check)) continue;
 
        add:
-               expansions[count] = str = malloc(reflen + strlen(check) + offset + 1);
+               MEM(expansions[count] = str = malloc(reflen + strlen(check) + offset + 1));
                memcpy(str, ref, reflen);
                str[reflen] = '.';
                strcpy(str + reflen + offset, check);