Skip to content

Commit

Permalink
goid-tool-cmdline.c: Check realloc return value
Browse files Browse the repository at this point in the history
Thanks Coverity CID 14282
  • Loading branch information
xhanulik committed May 27, 2024
1 parent 6eae1d3 commit 36df028
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tools/goid-tool-cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,8 @@ void update_multiple_arg(void *field, char ***orig_field,

if (prev_given && list) {
*orig_field = (char **) realloc (*orig_field, (field_given + prev_given) * sizeof (char *));
if (!*orig_field)
return;

switch(arg_type) {
case ARG_INT:
Expand Down

0 comments on commit 36df028

Please sign in to comment.