Skip to content
Snippets Groups Projects
Commit af1466d3 authored by deuce's avatar deuce
Browse files

If you're going to free() something, you likely shouldn't use alloca()...

parent 4e6d8192
Branches
Tags
No related merge requests found
...@@ -1754,7 +1754,7 @@ int getuser(scfg_t *cfg, user_t *user, char* str) ...@@ -1754,7 +1754,7 @@ int getuser(scfg_t *cfg, user_t *user, char* str)
} }
} }
FREE_AND_NULL(opt[j]); FREE_AND_NULL(opt[j]);
if((opt[j]=(struct user_list *)alloca(sizeof(struct user_list)))==NULL) if((opt[j]=(struct user_list *)malloc(sizeof(struct user_list)))==NULL)
allocfail(sizeof(struct user_list)); allocfail(sizeof(struct user_list));
opt[j]->info[0]=0; opt[j]->info[0]=0;
i=0; i=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment